Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreperico2010-02-26 16:32:08 +0000
committereperico2010-02-26 16:32:08 +0000
commit5a34b6aec374c00f6d98d6587075457ab53fae84 (patch)
tree5d1a65d2740066e033a4c9a04bbd10fa395532ba /plugins/profile-tool
parent1b63bb1eeefe796e25cd2652a1397537d765a742 (diff)
downloadorg.eclipse.papyrus-5a34b6aec374c00f6d98d6587075457ab53fae84.tar.gz
org.eclipse.papyrus-5a34b6aec374c00f6d98d6587075457ab53fae84.tar.xz
org.eclipse.papyrus-5a34b6aec374c00f6d98d6587075457ab53fae84.zip
NEW - bug 297816: [SysML] Provide a Parametric diagram
https://bugs.eclipse.org/bugs/show_bug.cgi?id=297816 - set up connector end management with connector using EMF validator - rename DiagramEditPart: ResourceEditPart to ParametricEditPart - organize imports
Diffstat (limited to 'plugins/profile-tool')
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.diagramprofile/src/org/eclipse/papyrus/diagramprofile/utils/StereotypeUtils.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/profile-tool/org.eclipse.papyrus.diagramprofile/src/org/eclipse/papyrus/diagramprofile/utils/StereotypeUtils.java b/plugins/profile-tool/org.eclipse.papyrus.diagramprofile/src/org/eclipse/papyrus/diagramprofile/utils/StereotypeUtils.java
index c1ed8a3510c..4febccb91ee 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.diagramprofile/src/org/eclipse/papyrus/diagramprofile/utils/StereotypeUtils.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.diagramprofile/src/org/eclipse/papyrus/diagramprofile/utils/StereotypeUtils.java
@@ -153,5 +153,19 @@ public class StereotypeUtils {
element.applyProfile(profile);
}
}
+
+ /**
+ * Apply stereotype to element.
+ *
+ * @param element the element
+ * @param stereotypeName the stereotype qualified name
+ */
+ public static void applyStereotypeToElement(Element element, String stereotypeName) {
+ for (Stereotype stereotype : element.getApplicableStereotypes()) {
+ if (stereotype.getQualifiedName().equals(stereotypeName)) {
+ element.applyStereotype(stereotype);
+ }
+ }
+ }
}

Back to the top