Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/META-INF/MANIFEST.MF6
-rw-r--r--incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/Messages.java1
-rw-r--r--incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/messages.properties5
-rw-r--r--incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/provider/ViewLabelProvider.java10
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLFilteredLabelProvider.java8
5 files changed, 18 insertions, 12 deletions
diff --git a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/META-INF/MANIFEST.MF b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/META-INF/MANIFEST.MF
index 9379598d28f..0afd771a2a4 100644
--- a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/META-INF/MANIFEST.MF
+++ b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/META-INF/MANIFEST.MF
@@ -8,9 +8,11 @@ Bundle-Activator: org.eclipse.papyrus.infra.services.viewlabelprovider.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.0",
org.eclipse.ui;bundle-version="3.105.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.6.0",
org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0"
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
+ org.eclipse.emf.ecore;bundle-version="2.9.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %vendorName
diff --git a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/Messages.java b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/Messages.java
index ac30d3457f9..afcb25bb222 100644
--- a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/Messages.java
+++ b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/Messages.java
@@ -23,7 +23,6 @@ public class Messages extends NLS {
public static String ViewLabelProvider_1;
- public static String ViewLabelProvider_2;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/messages.properties b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/messages.properties
index 7e6fd8da641..8ce9de16fd6 100644
--- a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/messages.properties
+++ b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/messages.properties
@@ -1,3 +1,2 @@
-ViewLabelProvider_0=Failed to start label service for :
-ViewLabelProvider_1=\ (view)
-ViewLabelProvider_2=Failed to start label service for :
+ViewLabelProvider_0=Failed to retrieve label service for :
+ViewLabelProvider_1=\ (view)
diff --git a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/provider/ViewLabelProvider.java b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/provider/ViewLabelProvider.java
index f3a113811ce..689a5a41569 100644
--- a/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/provider/ViewLabelProvider.java
+++ b/incoming/org.eclipse.papyrus.infra.services.viewlabelprovider/src/org/eclipse/papyrus/infra/services/viewlabelprovider/provider/ViewLabelProvider.java
@@ -18,9 +18,9 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.services.viewlabelprovider.Activator;
import org.eclipse.papyrus.infra.services.viewlabelprovider.Messages;
import org.eclipse.swt.graphics.Image;
@@ -64,9 +64,8 @@ public class ViewLabelProvider implements IFilteredLabelProvider {
EObject semanticElement = ((View)element).getElement();
if(semanticElement != null) {
- LabelProviderService service = new LabelProviderServiceImpl();
try {
- service.startService();
+ LabelProviderService service = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, semanticElement);
return service.getLabelProvider().getImage(semanticElement);
} catch (ServiceException e) {
Activator.log.warn(Messages.ViewLabelProvider_0 + semanticElement);
@@ -89,12 +88,11 @@ public class ViewLabelProvider implements IFilteredLabelProvider {
EObject semanticElement = ((View)element).getElement();
if(semanticElement != null) {
- LabelProviderService service = new LabelProviderServiceImpl();
try {
- service.startService();
+ LabelProviderService service = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, semanticElement);
return service.getLabelProvider().getText(semanticElement) + Messages.ViewLabelProvider_1;
} catch (ServiceException e) {
- Activator.log.warn(Messages.ViewLabelProvider_2 + semanticElement);
+ Activator.log.warn(Messages.ViewLabelProvider_0 + semanticElement);
}
}
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLFilteredLabelProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLFilteredLabelProvider.java
index ad96345f04d..3e789e33b34 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLFilteredLabelProvider.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLFilteredLabelProvider.java
@@ -18,6 +18,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
/**
* The Modisco customizable label provider doesn't handle standard EObjects,
@@ -56,10 +57,17 @@ public class UMLFilteredLabelProvider extends UMLLabelProvider implements IFilte
if(eObject == null) {
return false;
}
+
+ //UML Elements
if(eObject instanceof Element) {
return true;
}
+ //Stereotype applications
+ if(UMLUtil.getBaseElement(eObject) != null) {
+ return true;
+ }
+
return false;
}

Back to the top