Commit ed1455aa authored by Romain Bioteau's avatar Romain Bioteau

code quality

parent b2f1b9dc
......@@ -16,6 +16,7 @@
*/
package org.bonitasoft.studio.common.palette;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
......@@ -123,13 +124,13 @@ public class FormPaletteLabelProvider {
public String getFormPaletteText(final EClass eClass) {
final int id = getEClassifierId(eClass);
final String label = classifierIDToTitle.get(id);
Assert.isLegal(label != null, "EClass " + eClass.getName() + " is not supported.");
Assert.isLegal(label != null, MessageFormat.format("EClass {0} is not supported.", eClass.getName()));
return label;
}
protected int getEClassifierId(final EClass eClass) {
Assert.isLegal(eClass != null);
Assert.isLegal(FormPackage.Literals.WIDGET.isSuperTypeOf(eClass), "EClass " + eClass.getName() + " is not supported.");
Assert.isLegal(FormPackage.Literals.WIDGET.isSuperTypeOf(eClass), MessageFormat.format("EClass {0} is not supported.", eClass.getName()));
return eClass.getClassifierID();
}
......
......@@ -16,6 +16,7 @@
*/
package org.bonitasoft.studio.common.palette;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
......@@ -170,7 +171,7 @@ public class ProcessPaletteLabelProvider {
protected int getEClassifierId(final EClass eClass) {
Assert.isLegal(eClass != null);
Assert.isLegal(ProcessPackage.eINSTANCE.equals(eClass.getEPackage()), "EClass " + eClass.getName() + " is not supported.");
Assert.isLegal(ProcessPackage.eINSTANCE.equals(eClass.getEPackage()), MessageFormat.format("EClass {0} is not supported.", eClass.getName()));
return eClass.getClassifierID();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment