Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-02-10 16:24:30 +0000
committercletavernie2012-02-10 16:24:30 +0000
commit2d043643e2d2cdebc82d329ff30b8fa4c63fc862 (patch)
treeef68eb76278e4d1d6cd85b48cac171ac6d253b30
parent8137badabeda5f447158f1b5a37cc44c92cf9704 (diff)
downloadorg.eclipse.papyrus-2d043643e2d2cdebc82d329ff30b8fa4c63fc862.tar.gz
org.eclipse.papyrus-2d043643e2d2cdebc82d329ff30b8fa4c63fc862.tar.xz
org.eclipse.papyrus-2d043643e2d2cdebc82d329ff30b8fa4c63fc862.zip
356727: [Class Diagram] Broken diagram when linking a Comment to an Element
https://bugs.eclipse.org/bugs/show_bug.cgi?id=356727
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/util/DecorationUtils.java16
2 files changed, 6 insertions, 13 deletions
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/META-INF/MANIFEST.MF b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/META-INF/MANIFEST.MF
index 64fa3134aac..c89d6cbdba8 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/META-INF/MANIFEST.MF
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/META-INF/MANIFEST.MF
@@ -7,8 +7,7 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core;bundle-version="0.9.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0"
+ org.eclipse.papyrus.infra.core;bundle-version="0.9.0"
Bundle-Vendor: %providerName
Bundle-Version: 0.9.0.qualifier
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/util/DecorationUtils.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/util/DecorationUtils.java
index 75ac4a47d4d..2509d808e02 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/util/DecorationUtils.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/util/DecorationUtils.java
@@ -20,7 +20,6 @@ import org.apache.commons.lang.WordUtils;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.facet.infra.browser.uicore.internal.model.LinkItem;
-import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.services.decoration.Activator;
import org.eclipse.papyrus.infra.services.decoration.DecorationService;
@@ -71,18 +70,12 @@ public class DecorationUtils {
* the e object
*/
public DecorationUtils(EObject eObject) {
+ if(eObject == null) {
+ throw new IllegalArgumentException("The decorated EObject shall not be null");
+ }
setEObject(eObject);
}
- /**
- * Instantiates a new decoration utils.
- *
- * @param view
- * the view
- */
- public DecorationUtils(View view) {
- setEObject(view.getElement());
- }
/**
* Try child if empty.
@@ -177,8 +170,9 @@ public class DecorationUtils {
severity = severityI;
}
}
- if(!navigateToParents)
+ if(!navigateToParents) {
break;
+ }
// navigate to parents, since parent folder is contaminated as well
eObjectOfDecorator = eObjectOfDecorator.eContainer();
if(markChildren != MarkChildren.ALL) {

Back to the top