Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-02-03 15:16:17 +0000
committercletavernie2012-02-03 15:16:17 +0000
commitdb9bffa44ba3dea6d9c31c35c21b6ee9399f10f9 (patch)
tree20478a0b30bc284565a7f6ca20aa2957940c78e0 /plugins/sysml
parentf4e72d08d0f7e0b7543edd895cf55f60fdad81e2 (diff)
downloadorg.eclipse.papyrus-db9bffa44ba3dea6d9c31c35c21b6ee9399f10f9.tar.gz
org.eclipse.papyrus-db9bffa44ba3dea6d9c31c35c21b6ee9399f10f9.tar.xz
org.eclipse.papyrus-db9bffa44ba3dea6d9c31c35c21b6ee9399f10f9.zip
358732: [Model Explorer] Make the model explorer view fully implemented with EMF Facet
https://bugs.eclipse.org/bugs/show_bug.cgi?id=358732 Fix NPE
Diffstat (limited to 'plugins/sysml')
-rw-r--r--plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
index 05b35a3905e..0ded9eb1614 100644
--- a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
+++ b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
@@ -15,29 +15,29 @@ public class GetImageQuery implements IJavaModelQuery<Element, String> {
public String evaluate(final Element context, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
- String icon_path = "";
+ String iconPath = "";
if(!context.getAppliedStereotypes().isEmpty()) {
Stereotype first_stereotype = context.getAppliedStereotypes().get(0);
if(!first_stereotype.getIcons().isEmpty()) {
org.eclipse.uml2.uml.Image icon = ElementUtil.getStereotypeImage(context, first_stereotype, "icon");
if(icon != null) {
- icon_path = icon.getLocation();
+ iconPath = icon.getLocation();
}
}
}
- String image_path = "";
+ String imagePath = "";
- if(!"".equals(icon_path)) {
- URI iconURI = URI.createURI(icon_path);
+ if(iconPath != null && !"".equals(iconPath)) {
+ URI iconURI = URI.createURI(iconPath);
if(iconURI.isRelative()) {
- image_path = sysml_plugin_path + icon_path;
+ imagePath = sysml_plugin_path + iconPath;
} else {
- image_path = iconURI.toPlatformString(true);
+ imagePath = iconURI.toPlatformString(true);
}
}
- return image_path;
+ return imagePath;
}
}

Back to the top