summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhubner2008-11-04 05:29:39 (EST)
committer dhubner2008-11-04 05:29:39 (EST)
commit6b17d78cf444e11b74747c4199650efc08b1752c (patch)
tree772b17dd7afdba3738092bf45460d78b8f5d30df
parent04709bba1213c26182995b5e769c4b929a70997e (diff)
downloadorg.eclipse.xpand-6b17d78cf444e11b74747c4199650efc08b1752c.zip
org.eclipse.xpand-6b17d78cf444e11b74747c4199650efc08b1752c.tar.gz
org.eclipse.xpand-6b17d78cf444e11b74747c4199650efc08b1752c.tar.bz2
fixed iconname is null bug
removed old contenttype def
-rw-r--r--examples/org.eclipse.emf.generic.editor/plugin.xml15
-rw-r--r--examples/org.eclipse.emf.generic.editor/src/org/eclipse/emf/editor/provider/ExtendedLabelProvider.java16
2 files changed, 9 insertions, 22 deletions
diff --git a/examples/org.eclipse.emf.generic.editor/plugin.xml b/examples/org.eclipse.emf.generic.editor/plugin.xml
index ef8de43..ff9a04e 100644
--- a/examples/org.eclipse.emf.generic.editor/plugin.xml
+++ b/examples/org.eclipse.emf.generic.editor/plugin.xml
@@ -15,21 +15,6 @@
<contentTypeBinding
contentTypeId="org.eclipse.emf.emof">
</contentTypeBinding>
- <contentTypeBinding
- contentTypeId="org.eclipse.emf.generic.xmi">
- </contentTypeBinding>
</editor>
</extension>
-<extension
- point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- base-type="org.eclipse.core.runtime.xml"
- id="org.eclipse.emf.generic.xmi"
- name="Ecore Instance"
- priority="high">
- <describer
- class="org.eclipse.emf.ecore.xmi.impl.XMLContentHandlerImpl$XMI$Describer">
- </describer>
- </content-type>
- </extension>
</plugin>
diff --git a/examples/org.eclipse.emf.generic.editor/src/org/eclipse/emf/editor/provider/ExtendedLabelProvider.java b/examples/org.eclipse.emf.generic.editor/src/org/eclipse/emf/editor/provider/ExtendedLabelProvider.java
index 6846c80..f99325c 100644
--- a/examples/org.eclipse.emf.generic.editor/src/org/eclipse/emf/editor/provider/ExtendedLabelProvider.java
+++ b/examples/org.eclipse.emf.generic.editor/src/org/eclipse/emf/editor/provider/ExtendedLabelProvider.java
@@ -56,16 +56,18 @@ public class ExtendedLabelProvider implements IItemLabelProvider {
if (element instanceof EObject) {
EObject eObject = (EObject) element;
String iconName = evaluate(eObject, ICON_EXTENSION_NAME);
- // TODO try instance scope
- retVal = locateImage(iconName, eObject.eResource(), eObject);
- // if not found try metamodel scope
- Resource eResource = eObject.eClass().eResource();
- if (retVal == null && iconName != null)
- retVal = locateImage(iconName, eResource, eObject);
+ if (iconName != null) {
+ // TODO try instance scope
+ retVal = locateImage(iconName, eObject.eResource(), eObject);
+ // if not found try metamodel scope
+ Resource eResource = eObject.eClass().eResource();
+ if (retVal == null)
+ retVal = locateImage(iconName, eResource, eObject);
+ }
}
}
catch (Throwable ex) {
- EEPlugin.logError("ERROR", ex);
+ EEPlugin.logError("ERROR fetching Icon", ex);
}
if (retVal == null) {
// Fallback: Ask registry for image