Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bonita
bonita-studio
Commits
ed1455aa
Commit
ed1455aa
authored
Oct 30, 2014
by
Romain Bioteau
Browse files
code quality
parent
b2f1b9dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
bundles/plugins/org.bonitasoft.studio.common/src/org/bonitasoft/studio/common/palette/FormPaletteLabelProvider.java
View file @
ed1455aa
...
...
@@ -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
();
}
...
...
bundles/plugins/org.bonitasoft.studio.common/src/org/bonitasoft/studio/common/palette/ProcessPaletteLabelProvider.java
View file @
ed1455aa
...
...
@@ -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
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment