Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-10-08 12:27:46 +0000
committerAnsgar Radermacher2013-10-08 12:37:31 +0000
commitebc0edcde9d81e8483366be8ef6a1127a01918ae (patch)
tree595df2d1a8f4781f0d8f3c525ac91545d1758142 /extraplugins
parent428053015865f9146a26e8aff728af8ab732c829 (diff)
downloadorg.eclipse.papyrus-ebc0edcde9d81e8483366be8ef6a1127a01918ae.tar.gz
org.eclipse.papyrus-ebc0edcde9d81e8483366be8ef6a1127a01918ae.tar.xz
org.eclipse.papyrus-ebc0edcde9d81e8483366be8ef6a1127a01918ae.zip
Use StereotypeUtil from Papyrus instead of StUtils from qdesigner
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/AggregationKindValid.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/BehaviorsWithoutSpecification.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConfigurationAttributeNotSet.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConnectorCallMultiplicity.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ExecutorIsNotUsedAsPartName.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/InstanceSpecificationSlotForAllProperties.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsAreImplemented.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsWithTwoReturnValues.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/TemplateRefWithoutBinding.java4
10 files changed, 20 insertions, 19 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/META-INF/MANIFEST.MF b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/META-INF/MANIFEST.MF
index ac42ad259d1..ad811d1c4c1 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/META-INF/MANIFEST.MF
@@ -4,7 +4,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.validation;bundle-version="1.3.0",
org.eclipse.papyrus.qompass.designer.core;bundle-version="0.10.1",
org.eclipse.papyrus.fcm.profile;bundle-version="0.10.1",
- org.eclipse.ui
+ org.eclipse.ui,
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="0.10.1"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 0.10.1.qualifier
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/AggregationKindValid.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/AggregationKindValid.java
index d21c7fe40ec..05b29af0aa8 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/AggregationKindValid.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/AggregationKindValid.java
@@ -13,7 +13,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.ConfigurationProperty;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.uml2.uml.AggregationKind;
import org.eclipse.uml2.uml.Class;
@@ -48,7 +48,7 @@ public class AggregationKindValid extends AbstractModelConstraint {
if(type instanceof Class) {
AggregationKind aggKind = attribute.getAggregation();
if(aggKind != AggregationKind.COMPOSITE_LITERAL) {
- if (StUtils.isApplicable(attribute, ConfigurationProperty.class) && !Utils.isSingleton((Class)type)) {
+ if (StereotypeUtil.isApplicable(attribute, ConfigurationProperty.class) && !Utils.isSingleton((Class)type)) {
// no composition, but not singleton: warn user to make up a proper deployment plan
// validation has been made Qompass specific by checking whether the Configuration attribute is applicable
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/BehaviorsWithoutSpecification.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/BehaviorsWithoutSpecification.java
index abbdb5f7fc2..9ce7a259336 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/BehaviorsWithoutSpecification.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/BehaviorsWithoutSpecification.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.DerivedElement;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.OpaqueBehavior;
@@ -39,7 +39,7 @@ public class BehaviorsWithoutSpecification extends AbstractModelConstraint {
if (behavior.getSpecification () == null) {
Element class_ = behavior.getOwner ();
- if (StUtils.isApplicable(class_, DerivedElement.class)) {
+ if (StereotypeUtil.isApplicable(class_, DerivedElement.class)) {
// check whether DerivedElement is applicable => indirect check whether FCM is applied (make rule specific to Qompass)
// TODO alternative? check whether behavior is referenced from either an activity, since that is possible in general?
/*
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConfigurationAttributeNotSet.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConfigurationAttributeNotSet.java
index bd95c6bf730..e94589ce9a0 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConfigurationAttributeNotSet.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConfigurationAttributeNotSet.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.uml2.uml.Slot;
import org.eclipse.uml2.uml.StructuralFeature;
import org.eclipse.papyrus.FCM.ConfigurationProperty;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
/**
* Verify if all configuration attribute have a (user-provided) value.
@@ -30,7 +30,7 @@ public class ConfigurationAttributeNotSet extends AbstractModelConstraint {
{
Slot slot = (Slot) ctx.getTarget();
StructuralFeature feature = slot.getDefiningFeature ();
- if ((feature != null) && (StUtils.isApplied (feature, ConfigurationProperty.class))) {
+ if ((feature != null) && (StereotypeUtil.isApplied (feature, ConfigurationProperty.class))) {
if (slot.getValues ().size () == 0) {
return ctx.createFailureStatus ("The attribute '" + feature.getName () + "' is tagged as a configuration property, but the associated slot has no value.");
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConnectorCallMultiplicity.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConnectorCallMultiplicity.java
index e05f98a5450..d298aa04306 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConnectorCallMultiplicity.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ConnectorCallMultiplicity.java
@@ -19,7 +19,7 @@ import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.DerivedElement;
import org.eclipse.papyrus.qompass.designer.core.ConnectorUtils;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.Port;
@@ -40,7 +40,7 @@ public class ConnectorCallMultiplicity extends AbstractModelConstraint
String portsStr = ""; //$NON-NLS-1$
Property part = (Property) ctx.getTarget();
- if (!StUtils.isApplicable(part, DerivedElement.class)) {
+ if (!StereotypeUtil.isApplicable(part, DerivedElement.class)) {
// make rule Qompass specific: only perform check, if the FCM profile is applied (checked via applicability
// the DerviedElement stereotype)
return ctx.createSuccessStatus();
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ExecutorIsNotUsedAsPartName.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ExecutorIsNotUsedAsPartName.java
index 7a80253ea49..17bb7c7e16a 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ExecutorIsNotUsedAsPartName.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/ExecutorIsNotUsedAsPartName.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.RuleApplication;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.papyrus.qompass.designer.core.transformations.ContainerTrafo;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Property;
@@ -35,7 +35,7 @@ public class ExecutorIsNotUsedAsPartName extends AbstractModelConstraint
Class class_ = (Class) ctx.getTarget();
- if (StUtils.isApplied(class_, RuleApplication.class)) {
+ if (StereotypeUtil.isApplied(class_, RuleApplication.class)) {
// limit check to classes applying a container rule.
for (Property attribute : class_.getOwnedAttributes ()) {
if (attribute.getName().equals(ContainerTrafo.executorPartName)) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/InstanceSpecificationSlotForAllProperties.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/InstanceSpecificationSlotForAllProperties.java
index e2303a19d1f..965bb595889 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/InstanceSpecificationSlotForAllProperties.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/InstanceSpecificationSlotForAllProperties.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.ConfigurationProperty;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.InstanceSpecification;
@@ -44,7 +44,7 @@ public class InstanceSpecificationSlotForAllProperties extends AbstractModelCons
for (Property attribute : class_.getOwnedAttributes ()) {
boolean foundAttribute = false;
- if (StUtils.isApplied(attribute, ConfigurationProperty.class)) {
+ if (StereotypeUtil.isApplied(attribute, ConfigurationProperty.class)) {
for (Slot slot : is.getSlots ()) {
if (slot.getDefiningFeature () == attribute) {
foundAttribute = true;
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsAreImplemented.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsAreImplemented.java
index a540dd08107..06dd35d944b 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsAreImplemented.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsAreImplemented.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.DerivedElement;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Operation;
@@ -38,7 +38,7 @@ public class OperationsAreImplemented extends AbstractModelConstraint
// operations within an interface are always abstract
return ctx.createSuccessStatus();
}
- if((!operation.isAbstract() && operation.getMethods().size() == 0) && StUtils.isApplicable(operation, DerivedElement.class)) {
+ if((!operation.isAbstract() && operation.getMethods().size() == 0) && StereotypeUtil.isApplicable(operation, DerivedElement.class)) {
return ctx.createFailureStatus ("The operation '" + operation.getName () +
" has no implementation (and is not marked as abstract)");
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsWithTwoReturnValues.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsWithTwoReturnValues.java
index dedad2e69ff..229961f0ca4 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsWithTwoReturnValues.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/OperationsWithTwoReturnValues.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.DerivedElement;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Parameter;
import org.eclipse.uml2.uml.ParameterDirectionKind;
@@ -43,7 +43,7 @@ public class OperationsWithTwoReturnValues extends AbstractModelConstraint
firstReturn = false;
}
else {
- if (StUtils.isApplicable(operation, DerivedElement.class)) {
+ if (StereotypeUtil.isApplicable(operation, DerivedElement.class)) {
return ctx.createFailureStatus ("The operation '" + operation.getName () + "' has more than one return parameter. It must have at most one");
}
else {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/TemplateRefWithoutBinding.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/TemplateRefWithoutBinding.java
index e8a6f674379..6729a4fbb08 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/TemplateRefWithoutBinding.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation/src/org/eclipse/papyrus/qompass/designer/validation/constraints/TemplateRefWithoutBinding.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.validation.AbstractModelConstraint;
import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.papyrus.FCM.DerivedElement;
-import org.eclipse.papyrus.qompass.designer.core.StUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.papyrus.qompass.designer.core.templates.TemplateUtils;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
@@ -46,7 +46,7 @@ public class TemplateRefWithoutBinding extends AbstractModelConstraint {
if (owner instanceof Package) {
Package pkg = (Package) owner;
if (TemplateUtils.getSignatureDirect(pkg) != null) {
- if (StUtils.isApplicable(pkg, DerivedElement.class) && !isWithin(pkg, te)) {
+ if (StereotypeUtil.isApplicable(pkg, DerivedElement.class) && !isWithin(pkg, te)) {
// the type of an element is defined within a package template (pkg), but the typed element (te) itself
// is defined outside of this package
return ctx.createFailureStatus("This element is typed with '" + type.getQualifiedName() + "', but defined outside the package template '" + //$NON-NLS-1$ //$NON-NLS-2$

Back to the top