Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/qompass-designer')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/deployment/DepPlanUtils.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/sync/InterfaceSync.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompTypeTrafos.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/container/ContainerTrafo.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/CppPortMapping.xtend3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/DynamicCpptoOO.xtend5
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/StaticCppToOO.xtend3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/src/org/eclipse/papyrus/qompass/designer/java/xtend/JavaToOO.xtend3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ChoosePorts.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java6
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/PullConsumer.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/TemplatePort.java7
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineGen.xtend5
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineUtil.java3
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java4
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java3
22 files changed, 48 insertions, 29 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java
index ef9a6750250..c3037fbb89e 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java
@@ -78,7 +78,9 @@ public class Utils {
*
* @param element
* @return the top-level owning package
+ * @deprecated Use getRootPackage method in oep.uml.tools.utils.PackageUtil
*/
+ @Deprecated
public static Package getTop(Element element) {
while (element != null) {
Element owner = element.getOwner();
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/deployment/DepPlanUtils.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/deployment/DepPlanUtils.java
index d78202e7b5c..69728ff9037 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/deployment/DepPlanUtils.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/deployment/DepPlanUtils.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.papyrus.FCM.DeploymentPlan;
import org.eclipse.papyrus.qompass.designer.core.Messages;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
@@ -65,7 +66,7 @@ public class DepPlanUtils {
* @return
*/
public static EList<Package> getAllDepPlans(Element element) {
- Package root = Utils.getTop(element);
+ Package root = PackageUtil.getRootPackage(element);
Package depPlanRoot = root.getNestedPackage(DeployConstants.depPlanFolder);
EList<Package> depPlanList = new BasicEList<Package>();
if (depPlanRoot != null) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/sync/InterfaceSync.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/sync/InterfaceSync.java
index ee2967d02e8..66e85da0cb6 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/sync/InterfaceSync.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/sync/InterfaceSync.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.papyrus.FCM.DerivedElement;
import org.eclipse.papyrus.qompass.designer.core.OperationUtils;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Generalization;
@@ -103,7 +104,7 @@ public class InterfaceSync {
public static void syncGenericSignalReceptionSupport(Interface intf) {
- NamedElement genericReceptionNE = Utils.getQualifiedElement(Utils.getTop(intf), SIGNAL_RECEPTION_QN);
+ NamedElement genericReceptionNE = Utils.getQualifiedElement(PackageUtil.getRootPackage(intf), SIGNAL_RECEPTION_QN);
if (genericReceptionNE instanceof Interface) {
Interface genericReceptionIntf = (Interface) genericReceptionNE;
if (intf.getOwnedReceptions().size() > 0) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompTypeTrafos.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompTypeTrafos.java
index 554249fb2a4..4fa6256b36a 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompTypeTrafos.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompTypeTrafos.java
@@ -19,6 +19,7 @@ import org.eclipse.papyrus.C_Cpp.Ptr;
import org.eclipse.papyrus.qompass.designer.core.Messages;
import org.eclipse.papyrus.qompass.designer.core.PortUtils;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Element;
@@ -107,7 +108,7 @@ public class CompTypeTrafos {
boolean multiPort = (port.getUpper() > 1) || (port.getUpper() == -1); // -1 indicates "*"
if (multiPort) {
// add index parameter
- Element eLong = Utils.getQualifiedElement(Utils.getTop(component), INDEX_TYPE_FOR_MULTI_RECEPTACLE);
+ Element eLong = Utils.getQualifiedElement(PackageUtil.getRootPackage(component), INDEX_TYPE_FOR_MULTI_RECEPTACLE);
if (eLong instanceof Type) {
op.createOwnedParameter("index", (Type) eLong); //$NON-NLS-1$
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/container/ContainerTrafo.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/container/ContainerTrafo.java
index 342830d705a..4a88dd60280 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/container/ContainerTrafo.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/container/ContainerTrafo.java
@@ -46,6 +46,7 @@ import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationC
import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationException;
import org.eclipse.papyrus.qompass.designer.core.transformations.connector.ConnectorReification;
import org.eclipse.papyrus.uml.tools.utils.ConnectorUtil;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Class;
@@ -117,7 +118,7 @@ public class ContainerTrafo extends AbstractContainerTrafo {
// tmComponent is not a member of the target model. This is the case, if tmComponent is
// in an imported model that has not been copied during the transformation towards an intermediate
// model.
- tmPkgOwner = MapUtil.getAndCreate(Utils.getTop(tmCDP), tmComponent.allNamespaces(), true);
+ tmPkgOwner = MapUtil.getAndCreate(PackageUtil.getRootPackage(tmCDP), tmComponent.allNamespaces(), true);
}
// create a container with the suitable postfix
tmContainerImpl = tmPkgOwner.createOwnedClass(tmComponent.getName() + containerPostfix, false);
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/META-INF/MANIFEST.MF b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/META-INF/MANIFEST.MF
index cd20c9880fa..2aba805aa94 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.qompass.designer.core;bundle-version="1.1.0",
org.eclipse.uml2.uml;bundle-version="5.0.1",
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.cpp.profile;bundle-version="1.1.0"
+ org.eclipse.papyrus.cpp.profile;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/CppPortMapping.xtend b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/CppPortMapping.xtend
index 238f4e81035..05dd7c50459 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/CppPortMapping.xtend
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/CppPortMapping.xtend
@@ -40,6 +40,7 @@ import org.eclipse.uml2.uml.StructuralFeature
import org.eclipse.papyrus.qompass.designer.cpp.Messages
import org.eclipse.papyrus.qompass.designer.cpp.Constants
import static extension org.eclipse.papyrus.qompass.designer.cpp.xtend.CppUtils.nameRef;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil
/**
* This class realizes the transformation from component-based to object-oriented
@@ -200,7 +201,7 @@ class CppPortMapping implements IOOTrafo {
if (multiPort) {
// add index parameter
- val eLong = Utils.getQualifiedElement(Utils.getTop(implementation),
+ val eLong = Utils.getQualifiedElement(PackageUtil.getRootPackage(implementation),
CompTypeTrafos.INDEX_TYPE_FOR_MULTI_RECEPTACLE)
if (eLong instanceof Type) {
op.createOwnedParameter("index", eLong as Type)
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/DynamicCpptoOO.xtend b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/DynamicCpptoOO.xtend
index 41910d1492a..15a4477e2e4 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/DynamicCpptoOO.xtend
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/DynamicCpptoOO.xtend
@@ -39,6 +39,7 @@ import org.eclipse.emf.common.util.EList
import org.eclipse.papyrus.qompass.designer.cpp.Messages
import org.eclipse.papyrus.qompass.designer.cpp.Constants
import static extension org.eclipse.papyrus.qompass.designer.cpp.xtend.CppUtils.nameRef;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil
/**
* This class realizes the dynamic variant of the OO-transformation
@@ -190,7 +191,7 @@ class DynamicCppToOO implements IOOTrafo {
if (multiPort) {
// add index parameter
- val eLong = Utils.getQualifiedElement(Utils.getTop(implementation),
+ val eLong = Utils.getQualifiedElement(PackageUtil.getRootPackage(implementation),
CompTypeTrafos.INDEX_TYPE_FOR_MULTI_RECEPTACLE)
if (eLong instanceof Type) {
op.createOwnedParameter("index", eLong as Type)
@@ -485,7 +486,7 @@ class DynamicCppToOO implements IOOTrafo {
}
}
- val partManager = Utils.getQualifiedElement(Utils.getTop(compositeImplementation), PART_MANAGER);
+ val partManager = Utils.getQualifiedElement(PackageUtil.getRootPackage(compositeImplementation), PART_MANAGER);
if (partManager instanceof Type) {
compositeImplementation.createOwnedAttribute(PARTS, partManager as Type);
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/StaticCppToOO.xtend b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/StaticCppToOO.xtend
index dea416e7bbe..5bf2210442f 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/StaticCppToOO.xtend
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.cpp/src/org/eclipse/papyrus/qompass/designer/cpp/xtend/StaticCppToOO.xtend
@@ -40,6 +40,7 @@ import org.eclipse.uml2.uml.StructuralFeature
import org.eclipse.papyrus.qompass.designer.cpp.Messages
import org.eclipse.papyrus.qompass.designer.cpp.Constants
import static extension org.eclipse.papyrus.qompass.designer.cpp.xtend.CppUtils.nameRef;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil
/**
* This class realizes the transformation from component-based to object-oriented
@@ -203,7 +204,7 @@ class StaticCppToOO implements IOOTrafo {
if (multiPort) {
// add index parameter
- val eLong = Utils.getQualifiedElement(Utils.getTop(implementation),
+ val eLong = Utils.getQualifiedElement(PackageUtil.getRootPackage(implementation),
CompTypeTrafos.INDEX_TYPE_FOR_MULTI_RECEPTACLE)
if (eLong instanceof Type) {
op.createOwnedParameter("index", eLong as Type)
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/META-INF/MANIFEST.MF b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/META-INF/MANIFEST.MF
index ca75da00db5..d4ae012b440 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/META-INF/MANIFEST.MF
@@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.ui,
com.google.guava,
org.eclipse.xtext.xbase.lib,
org.eclipse.xtend.lib,
- org.eclipse.xtend.lib.macro
+ org.eclipse.xtend.lib.macro,
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/src/org/eclipse/papyrus/qompass/designer/java/xtend/JavaToOO.xtend b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/src/org/eclipse/papyrus/qompass/designer/java/xtend/JavaToOO.xtend
index f06b3d6eb0e..ef368eb0d76 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/src/org/eclipse/papyrus/qompass/designer/java/xtend/JavaToOO.xtend
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.java/src/org/eclipse/papyrus/qompass/designer/java/xtend/JavaToOO.xtend
@@ -36,6 +36,7 @@ import org.eclipse.emf.common.util.EList
import org.eclipse.uml2.uml.StructuralFeature
import org.eclipse.papyrus.qompass.designer.java.Messages
import org.eclipse.papyrus.qompass.designer.core.extensions.IOOTrafo
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil
/**
* This class realizes the transformation from component-based to object-oriented
@@ -208,7 +209,7 @@ class JavaToOO implements IOOTrafo {
if (multiPort) {
// add index parameter
- val eLong = Utils.getQualifiedElement(Utils.getTop(implementation),
+ val eLong = Utils.getQualifiedElement(PackageUtil.getRootPackage(implementation),
CompTypeTrafos.INDEX_TYPE_FOR_MULTI_RECEPTACLE)
if (eLong instanceof Type) {
op.createOwnedParameter("index", eLong as Type)
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
index 9e9f9c27f52..50c598fc46c 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
@@ -25,11 +25,11 @@ import org.eclipse.papyrus.MARTE.MARTE_DesignModel.SRM.SW_Concurrency.SwSchedula
import org.eclipse.papyrus.infra.widgets.toolbox.utils.DialogUtils;
import org.eclipse.papyrus.qompass.designer.core.CommandSupport;
import org.eclipse.papyrus.qompass.designer.core.ElementFilter;
-import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.core.commands.AddMarteAndFcmProfile;
import org.eclipse.papyrus.qompass.designer.core.deployment.AllocUtils;
import org.eclipse.papyrus.qompass.designer.core.deployment.BootLoaderGen;
import org.eclipse.papyrus.qompass.designer.core.deployment.DepUtils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -299,7 +299,7 @@ public class AllocationDialog extends SelectionStatusDialog {
Shell shell = new Shell();
if (MessageDialog.openQuestion(shell, "Error",
"Stereotype application failed. The profile MARTE::Allocation is probably not applied. Try to apply it?")) {
- AbstractEMFOperation applyProfile = new AddMarteAndFcmProfile(Utils.getTop(is), AddMarteAndFcmProfile.APPLY_ALLOC, TransactionUtil.getEditingDomain(is));
+ AbstractEMFOperation applyProfile = new AddMarteAndFcmProfile(PackageUtil.getRootPackage(is), AddMarteAndFcmProfile.APPLY_ALLOC, TransactionUtil.getEditingDomain(is));
CommandSupport.exec(applyProfile);
AllocUtils.allocate(is, newNode);
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ChoosePorts.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ChoosePorts.java
index dab3d41cf16..df3f4e3e44f 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ChoosePorts.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ChoosePorts.java
@@ -25,6 +25,7 @@ import org.eclipse.papyrus.uml.profile.ui.dialogs.AlphabeticalViewerSorter;
import org.eclipse.papyrus.uml.profile.ui.dialogs.ChooseSetAssistedDialog;
import org.eclipse.papyrus.uml.profile.ui.dialogs.IChooseDialog;
import org.eclipse.papyrus.uml.properties.profile.ui.dialogs.StereotypeQualifiedLabelProvider;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -81,7 +82,7 @@ public class ChoosePorts extends ChooseSetAssistedDialog implements IChooseDialo
} else {
// global rule with intercept some policy
// choose all ports vs. ports of "standard components"
- Package top = Utils.getTop(rule.getBase_Property());
+ Package top = PackageUtil.getRootPackage(rule.getBase_Property());
for (Feature current : Utils.getAllElementsOfType(top, Feature.class)) {
if (!selectedElementList.contains(current)) {
possibleElementList.addElement(current);
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java
index c93b9940571..be19be8f188 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java
@@ -140,7 +140,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
m_feature = feature;
m_model = PackageUtil.getUserModel(from);
if (m_model == null) {
- m_model = Utils.getTop(feature);
+ m_model = PackageUtil.getRootPackage(feature);
}
m_instance = null;
if (feature instanceof Connector) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java
index 4a349f020bf..1344a1b86dc 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java
@@ -34,10 +34,10 @@ import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
import org.eclipse.papyrus.infra.widgets.toolbox.utils.DialogUtils;
import org.eclipse.papyrus.qompass.designer.core.Description;
import org.eclipse.papyrus.qompass.designer.core.PortUtils;
-import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.ui.Messages;
import org.eclipse.papyrus.uml.tools.providers.ServiceEditFilteredContentProvider;
import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
@@ -107,7 +107,7 @@ public class ConfigurePortDialog extends SelectionStatusDialog {
// visitedPackages = new BasicEList<Package> ();
m_component = port.getClass_();
m_currentPort = port; // preselect port (don't call selectPort before initialization of dialog area);
- m_model = Utils.getTop(m_component);
+ m_model = PackageUtil.getRootPackage(m_component);
m_ports = PortUtils.getAllPorts(m_component);
return true;
}
@@ -115,7 +115,7 @@ public class ConfigurePortDialog extends SelectionStatusDialog {
public boolean init(Class clazz) {
// visitedPackages = new BasicEList<Package> ();
m_component = clazz;
- m_model = Utils.getTop(m_component);
+ m_model = PackageUtil.getRootPackage(m_component);
m_currentPort = null;
m_ports = PortUtils.getAllPorts(m_component);
return true;
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java
index 581994ad6d6..a84df010689 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java
@@ -28,6 +28,7 @@ import org.eclipse.papyrus.FCM.RuleApplication;
import org.eclipse.papyrus.infra.widgets.toolbox.utils.DialogUtils;
import org.eclipse.papyrus.qompass.designer.core.Description;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -88,7 +89,7 @@ public class ContainerDialog extends SelectionStatusDialog {
} else {
m_component = componentOrRule;
}
- m_model = Utils.getTop(componentOrRule);
+ m_model = PackageUtil.getRootPackage(componentOrRule);
}
/**
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/PullConsumer.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/PullConsumer.java
index cb897b197a6..e64ca26e575 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/PullConsumer.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/PullConsumer.java
@@ -21,6 +21,7 @@ import org.eclipse.papyrus.FCM.util.IMappingRule;
import org.eclipse.papyrus.FCM.util.MapUtil;
import org.eclipse.papyrus.qompass.designer.core.Log;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Interface;
@@ -127,7 +128,7 @@ public class PullConsumer implements IMappingRule {
parameter.setType(type);
}
}
- Package model = Utils.getTop(umlPort);
+ Package model = PackageUtil.getRootPackage(umlPort);
Element element = Utils.getQualifiedElement(model, BOOL_QNAME);
Type booleanType = null;
if (element instanceof Type) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/TemplatePort.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/TemplatePort.java
index 096e6255b29..f1b737d6544 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/TemplatePort.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/mappingrules/TemplatePort.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.qompass.designer.core.transformations.LazyCopier;
import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationException;
import org.eclipse.papyrus.qompass.designer.core.transformations.filters.FixTemplateSync;
import org.eclipse.papyrus.qompass.modellibs.core.Activator;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Interface;
@@ -91,7 +92,7 @@ public class TemplatePort implements ITemplateMappingRule {
EList<Namespace> path = TemplateUtils.relativePathWithMerge(extendedPort, pkgTemplate);
String name = pkgTemplate.getName() + "_" + type.getName(); //$NON-NLS-1$
- Package model = Utils.getTop(port);
+ Package model = PackageUtil.getRootPackage(port);
Package pkg = model.getNestedPackage(name);
if (pkg == null) {
model = Utils.getFirstLevel(port); // try whether package template exists here
@@ -125,7 +126,7 @@ public class TemplatePort implements ITemplateMappingRule {
TemplateSignature signature = TemplateUtils.getSignature(extendedPort.getNearestPackage());
if (signature != null) {
- Package model = Utils.getTop(port);
+ Package model = PackageUtil.getRootPackage(port);
try {
TemplateBinding binding =
TemplateUtils.fixedBinding(model, extendedPort, (Classifier) type);
@@ -162,7 +163,7 @@ public class TemplatePort implements ITemplateMappingRule {
EList<Namespace> path = TemplateUtils.relativePathWithMerge(extendedPort, pkgTemplate);
String name = pkgTemplate.getName() + "_" + type.getName(); //$NON-NLS-1$
- Package model = Utils.getTop(port);
+ Package model = PackageUtil.getRootPackage(port);
Package pkg = model.getNestedPackage(name);
if (pkg == null) {
model = Utils.getFirstLevel(port); // try whether package template exists here
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineGen.xtend b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineGen.xtend
index 3f3feae273d..69656151143 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineGen.xtend
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineGen.xtend
@@ -41,6 +41,7 @@ import static extension org.eclipse.papyrus.qompass.designer.core.UMLTool.*
import static extension org.eclipse.papyrus.qompass.modellibs.core.xtend.BehaviorUtil.*
import static extension org.eclipse.papyrus.qompass.modellibs.core.xtend.CppUtils.cppCall
import static extension org.eclipse.papyrus.qompass.modellibs.core.xtend.StateMachineUtil.*
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil
class StateMachineGen implements IXtend {
@@ -68,7 +69,7 @@ class StateMachineGen implements IXtend {
#endif
for (;;) {
processEvents();
- }
+ }
'''
def processEvents(Class clazz) {
@@ -96,7 +97,7 @@ class StateMachineGen implements IXtend {
«FOR attribute : signal.ownedAttributes»
signal->«attribute.name» = «attribute.name»;
«ENDFOR»
- «Utils.getTop(operation).declareDependencyToSignalIDs»
+ «PackageUtil.getRootPackage(operation).declareDependencyToSignalIDs»
«UMLTool.declareDependency(TransformationContext.classifier, signal)»
«ELSE»
// create event with operationID/portID and pass call
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineUtil.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineUtil.java
index 76818d91231..22d28fc2a6a 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineUtil.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/xtend/StateMachineUtil.java
@@ -8,6 +8,7 @@ import org.eclipse.papyrus.qompass.designer.core.UMLTool;
import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.core.templates.TemplateUtils;
import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationContext;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PackageableElement;
@@ -213,7 +214,7 @@ public class StateMachineUtil {
* @return
*/
public static Package boundPackageRef(Type actual) {
- for (Package nestedPkg : Utils.getTop(actual).getNestedPackages()) {
+ for (Package nestedPkg : PackageUtil.getRootPackage(actual).getNestedPackages()) {
if (nestedPkg.getTemplateBindings().size() > 0) {
TemplateBinding binding = nestedPkg.getTemplateBindings().get(0);
if (actual == TemplateUtils.getFirstActualFromBinding(binding)) {
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
index 796b2440ff8..64cdef2bc3c 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
@@ -1,10 +1,10 @@
package org.eclipse.papyrus.qompass.modellibs.tracing;
import org.eclipse.papyrus.qompass.designer.core.PortUtils;
-import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.core.deployment.DepPlanUtils;
import org.eclipse.papyrus.qompass.designer.core.extensions.IInstanceConfigurator;
import org.eclipse.papyrus.qompass.designer.core.transformations.container.ContainerTrafo;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Operation;
@@ -49,7 +49,7 @@ public class IConfiguratorOTF implements IInstanceConfigurator {
// since we add instance information to the trace (is that useful??, seems like a hack)
// TODO: originally, we used executorIS *in source model*
for (Operation op : intf.getOperations()) {
- String id = Utils.getTop(instance).getName() + "::Tracing::Trace::ID_" + //$NON-NLS-1$
+ String id = PackageUtil.getRootPackage(instance).getName() + "::Tracing::Trace::ID_" + //$NON-NLS-1$
instance.getName().replace(".", "_") + "_" + op.getName(); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
DepPlanUtils.configureProperty(instance, "id_" + op.getName(), id); //$NON-NLS-1$
}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
index d528c835a6a..8e286a6792e 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.infra.services.tracepoints.TracepointConstants;
import org.eclipse.papyrus.qompass.designer.core.Description;
import org.eclipse.papyrus.qompass.designer.core.Log;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Element;
@@ -152,7 +153,7 @@ public class QompassTraceMechanism implements ITraceMechanism {
}
return new BasicEList<ContainerRule>();
} else {
- Package top = Utils.getTop((Element) eObj);
+ Package top = PackageUtil.getRootPackage((Element) eObj);
return Utils.getAllRules(top);
}
}

Back to the top