Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-06-18 03:51:14 -0400
committercletavernie2013-06-18 03:51:14 -0400
commitf34449813cb9c381de4d8ba1d8cacb25d1bf1372 (patch)
tree12198450ff73ff5e9656fd8b4c26aac28533f56f
parent24b021c7c7e933973440a781f30b4bdb9a1c7ddd (diff)
downloadorg.eclipse.papyrus-f34449813cb9c381de4d8ba1d8cacb25d1bf1372.tar.gz
org.eclipse.papyrus-f34449813cb9c381de4d8ba1d8cacb25d1bf1372.tar.xz
org.eclipse.papyrus-f34449813cb9c381de4d8ba1d8cacb25d1bf1372.zip
382733: [validation] Papyrus shall to compute constraints from the profile at the model level
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382733 Clean up & add feature
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generation.ui/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator/src/org/eclipse/papyrus/dsml/validation/generator/Activator.java2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/Activator.java3
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ConstraintManagerImpl.java94
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ValidationRuleImpl.java95
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java8
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/META-INF/MANIFEST.MF4
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/build.properties5
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/Activator.java2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/CreateEMFValidationProject.java21
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/interfaces/IValidationPluginGenerator.java3
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation/src/org/eclipse/papyrus/dsml/validation/Activator.java8
-rw-r--r--features/papyrus-extra-features/org.eclipse.papyrus.extra.build.feature/feature.xml6
-rw-r--r--features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature/feature.xml75
-rw-r--r--features/papyrus-extra-features/org.eclipse.papyrus.extra.feature/feature.xml1
15 files changed, 185 insertions, 145 deletions
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generation.ui/META-INF/MANIFEST.MF b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generation.ui/META-INF/MANIFEST.MF
index 1b7122f3560..6f23e8f9dbd 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generation.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generation.ui/META-INF/MANIFEST.MF
@@ -17,7 +17,6 @@ Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.dsml.validation.generation.ui.Ac
tivator
-Bundle-SymbolicName: org.eclipse.papyrus.dsml.validation.generation.co
- mmands.ui;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.dsml.validation.model.ui;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator/src/org/eclipse/papyrus/dsml/validation/generator/Activator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator/src/org/eclipse/papyrus/dsml/validation/generator/Activator.java
index 4042545ff6d..901c7e61493 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator/src/org/eclipse/papyrus/dsml/validation/generator/Activator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator/src/org/eclipse/papyrus/dsml/validation/generator/Activator.java
@@ -40,6 +40,7 @@ public class Activator extends Plugin {
*
* @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -50,6 +51,7 @@ public class Activator extends Plugin {
*
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/Activator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/Activator.java
index c8aeb0ec609..f063b26d1e7 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/Activator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/Activator.java
@@ -18,6 +18,7 @@ import org.osgi.framework.BundleContext;
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
+
/**
* PluginID
* */
@@ -39,6 +40,7 @@ public class Activator extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -51,6 +53,7 @@ public class Activator extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ConstraintManagerImpl.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ConstraintManagerImpl.java
index 8571633e396..e3d0f00e41c 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ConstraintManagerImpl.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ConstraintManagerImpl.java
@@ -19,9 +19,7 @@ import java.util.Map;
import org.eclipse.papyrus.dsml.validation.IDSMLValidation;
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.Category;
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintProvider;
-import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsCategory;
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager;
-import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IValidationRule;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
@@ -49,7 +47,7 @@ public class ConstraintManagerImpl implements IConstraintsManager {
/**
*
* Constructor.
- *
+ *
* @param profile
*/
public ConstraintManagerImpl(Profile profile) {
@@ -63,15 +61,15 @@ public class ConstraintManagerImpl implements IConstraintsManager {
* plugin for validationRules validation.
*
* @param root
- * root profile for which the validation plugin will be generated
+ * root profile for which the validation plugin will be generated
*/
private void extractElements(Profile root) {
//get the list of validationRules for each stereotype
- createStereotypeToConstraintsMapping((Profile) root);
+ createStereotypeToConstraintsMapping(root);
//the top profile becomes the prime category
- primeCategory = new CategoryImpl( root.getName().toLowerCase(), null);
+ primeCategory = new CategoryImpl(root.getName().toLowerCase(), null);
//construct all sub categories
relateCategoriesWithConstraints(root, primeCategory);
@@ -83,19 +81,18 @@ public class ConstraintManagerImpl implements IConstraintsManager {
* a stereotype becomes a category
*
* @param element
- * element for which function will find validationRules and its
- * related categories
+ * element for which function will find validationRules and its
+ * related categories
* @param category
- * category for a group of validationRules
+ * category for a group of validationRules
*/
- private void relateCategoriesWithConstraints(Element element,
- Category category) {
+ private void relateCategoriesWithConstraints(Element element, Category category) {
- if (element instanceof Profile) {
+ if(element instanceof Profile) {
//creation of a category
- ConstraintCategoryImpl subCategory =new ConstraintCategoryImpl(((Profile)element).getName(), category );
+ ConstraintCategoryImpl subCategory = new ConstraintCategoryImpl(((Profile)element).getName(), category);
// add the category to the list of category
category.getSubcategories().add(subCategory);
//creation of a provider
@@ -104,22 +101,21 @@ public class ConstraintManagerImpl implements IConstraintsManager {
// associate validation to category to provider
constraintProvider.getConstraintsCategories().add(subCategory);
constraintsProviders.add(constraintProvider);
- if (((Profile)element).getDefinition()!=null){
+ if(((Profile)element).getDefinition() != null) {
constraintProvider.setEPackage(((Profile)element).getDefinition());
}
//iterate on all direct element of the profile
- for (NamedElement subElement : ((Profile) element).getOwnedMembers()) {
+ for(NamedElement subElement : ((Profile)element).getOwnedMembers()) {
//this a profile
- if (subElement instanceof Profile) {
- this.relateCategoriesWithConstraints(subElement,subCategory);
- }
- else if (subElement instanceof Stereotype) {
+ if(subElement instanceof Profile) {
+ this.relateCategoriesWithConstraints(subElement, subCategory);
+ } else if(subElement instanceof Stereotype) {
//create validation rules
- if (this.constraintsOfStereotype.get(subElement) != null) {
- for (Constraint constraint : this.constraintsOfStereotype.get(subElement)) {
+ if(this.constraintsOfStereotype.get(subElement) != null) {
+ for(Constraint constraint : this.constraintsOfStereotype.get(subElement)) {
try {
subCategory.getConstraints().add(new ValidationRuleImpl(constraint, subCategory));
} catch (WrongStereotypeException e) {
@@ -127,22 +123,25 @@ public class ConstraintManagerImpl implements IConstraintsManager {
}
}
}
-
+
}
}
-
+
}
}
- /**
+ /**
* create a category from the owner category and the sub-element that will becomes a category
- * @param category the category owner
- * @param subElement the element that will become a category
+ *
+ * @param category
+ * the category owner
+ * @param subElement
+ * the element that will become a category
* @return the category
*/
protected Category createCategory(Category category, NamedElement subElement) {
Category subCategory;
- subCategory = new CategoryImpl(category.getName() + "." + subElement.getName().toLowerCase(), category);
+ subCategory = new CategoryImpl(category.getName() + "." + subElement.getName().toLowerCase(), category);
return subCategory;
}
@@ -152,42 +151,37 @@ public class ConstraintManagerImpl implements IConstraintsManager {
* it add validationRules only if there are stereotype validationRules
*
* @param profile
- * root profile with stereotypes for which validationRules defined in
- * the model will be found
+ * root profile with stereotypes for which validationRules defined in
+ * the model will be found
*/
private void createStereotypeToConstraintsMapping(Profile profile) {
- for (Element element : profile.allOwnedElements()) {
+ for(Element element : profile.allOwnedElements()) {
- if (element instanceof Constraint) {
- if(element.getAppliedStereotype(IDSMLValidation.VALIDATIONRULE_STEREOTYPE)!=null){
+ if(element instanceof Constraint) {
+ if(element.getAppliedStereotype(IDSMLValidation.VALIDATIONRULE_STEREOTYPE) != null) {
- Element contextElement= ((Constraint)element).getContext();
+ Element contextElement = ((Constraint)element).getContext();
//get the stereotype to add the constraint
- if (contextElement instanceof Stereotype) {
- if (this.constraintsOfStereotype.keySet().contains(
- contextElement)) {
- this.constraintsOfStereotype.get(
- contextElement).add(
- (Constraint) element);
+ if(contextElement instanceof Stereotype) {
+ if(this.constraintsOfStereotype.keySet().contains(contextElement)) {
+ this.constraintsOfStereotype.get(contextElement).add((Constraint)element);
} else {
List<Constraint> constraintsList = new ArrayList<Constraint>();
- constraintsList.add((Constraint) element);
- this.constraintsOfStereotype.put(
- (Stereotype) contextElement,
- constraintsList);
+ constraintsList.add((Constraint)element);
+ this.constraintsOfStereotype.put((Stereotype)contextElement, constraintsList);
}
}
}
- }
+ }
}
}
/**
*
* @see org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager#getConstraintsProviders()
- *
+ *
*/
public List<IConstraintProvider> getConstraintsProviders() {
@@ -195,11 +189,11 @@ public class ConstraintManagerImpl implements IConstraintsManager {
}
-/**
- *
- * @see org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager#getPrimeCategory()
- *
- */
+ /**
+ *
+ * @see org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager#getPrimeCategory()
+ *
+ */
public Category getPrimeCategory() {
return this.primeCategory;
}
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ValidationRuleImpl.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ValidationRuleImpl.java
index 3b9eef0b354..e1bc734a702 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ValidationRuleImpl.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/elements/impl/ValidationRuleImpl.java
@@ -25,8 +25,8 @@ import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.Severity;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EnumerationLiteral;
import org.eclipse.uml2.uml.Stereotype;
-import org.eclipse.uml2.uml.internal.impl.EnumerationLiteralImpl;
/**
* Implementation of an interface relating to the constraint.
@@ -42,22 +42,22 @@ public class ValidationRuleImpl implements IValidationRule {
private Stereotype stereotype;
private String contextID;
-
+
private List<String> targets;
/**
* Constructor which takes as an parameter constraint from the model.
*
* @param constraint
- * constraint from the model
+ * constraint from the model
* @throws WrongStereotypeException
- * exception in case when constraint passed to the constructor
- * is not stereotyped with IValidationRule stereotype
+ * exception in case when constraint passed to the constructor
+ * is not stereotyped with IValidationRule stereotype
*/
- public ValidationRuleImpl(Constraint constraint)throws WrongStereotypeException {
+ public ValidationRuleImpl(Constraint constraint) throws WrongStereotypeException {
this.constraint = constraint;
stereotype = constraint.getAppliedStereotype(IDSMLValidation.VALIDATIONRULE_STEREOTYPE);
- if (stereotype == null) {
+ if(stereotype == null) {
throw new WrongStereotypeException(ERROR);
}
}
@@ -67,16 +67,15 @@ public class ValidationRuleImpl implements IValidationRule {
* category to which this constraint will belong.
*
* @param constraint
- * constraint from the model
+ * constraint from the model
* @param parentCategory
- * parent category
+ * parent category
* @throws WrongStereotypeException
- * exception in case when constraint passed to the constructor
- * is not stereotyped with IValidationRule stereotype
+ * exception in case when constraint passed to the constructor
+ * is not stereotyped with IValidationRule stereotype
*/
@SuppressWarnings("rawtypes")
- public ValidationRuleImpl(Constraint constraint, Category parentCategory)
- throws WrongStereotypeException {
+ public ValidationRuleImpl(Constraint constraint, Category parentCategory) throws WrongStereotypeException {
this(constraint);
@@ -84,16 +83,16 @@ public class ValidationRuleImpl implements IValidationRule {
* If the value of id has not been declared by the user, generated id
* value will be assigned and saved in the model.
*/
- if (constraint.getValue(stereotype, "id") == null||constraint.getValue(stereotype, "id").equals("")) {
- String qname= constraint.getQualifiedName().replace("::", ".");
+ if(constraint.getValue(stereotype, "id") == null || constraint.getValue(stereotype, "id").equals("")) {
+ String qname = constraint.getQualifiedName().replace("::", ".");
this.id = qname;
} else {
-
- this.id = (String) constraint.getValue(stereotype, "id");
+
+ this.id = (String)constraint.getValue(stereotype, "id");
}
- this.implementingClass = parentCategory.getID() + "." + this.getName()+ "Constraint";
+ this.implementingClass = parentCategory.getID() + "." + this.getName() + "Constraint";
this.contextID = parentCategory.getID();
@@ -104,29 +103,25 @@ public class ValidationRuleImpl implements IValidationRule {
* a target for a constraint, those elements which are extended by the
* stereotype to which the constraint applies.
*/
- if (constraint.getValue(stereotype, "target") != null
- && ((EDataTypeUniqueEList) constraint.getValue(stereotype,
- "target")).size() > 0) {
- for (Object target : (EDataTypeUniqueEList) constraint.getValue(
- stereotype, "target")) {
- if (target != null) {
- this.targets.add((String) target);
+ if(constraint.getValue(stereotype, "target") != null && ((EDataTypeUniqueEList)constraint.getValue(stereotype, "target")).size() > 0) {
+ for(Object target : (EDataTypeUniqueEList)constraint.getValue(stereotype, "target")) {
+ if(target != null) {
+ this.targets.add((String)target);
}
}
} else {
BasicEList<String> tgs = new BasicEList<String>();
- Element element= constraint.getContext();
+ Element element = constraint.getContext();
- if (element instanceof Stereotype) {
- for (Class extension : ((Stereotype) element)
- .getExtendedMetaclasses()) {
+ if(element instanceof Stereotype) {
+ for(Class extension : ((Stereotype)element).getExtendedMetaclasses()) {
- this.targets.add(extension.getName());
- tgs.add(extension.getName());
+ this.targets.add(extension.getName());
+ tgs.add(extension.getName());
- }
+ }
}
}
@@ -135,9 +130,8 @@ public class ValidationRuleImpl implements IValidationRule {
* assign default value for each constraint which is 1 and save it to
* the model.
*/
- this.statusCode = (Integer) constraint.getValue(stereotype,
- "statusCode");
- if (this.statusCode == null) {
+ this.statusCode = (Integer)constraint.getValue(stereotype, "statusCode");
+ if(this.statusCode == null) {
this.statusCode = new Integer(1);
}
@@ -150,7 +144,7 @@ public class ValidationRuleImpl implements IValidationRule {
public String getID() {
// TODO Auto-generated method stub
- return id == null ? (String) constraint.getValue(stereotype, "id") : id;
+ return id == null ? (String)constraint.getValue(stereotype, "id") : id;
}
private String id;
@@ -159,8 +153,7 @@ public class ValidationRuleImpl implements IValidationRule {
public Integer getStatusCode() {
// TODO Auto-generated method stub
- Integer statusCode = (Integer) constraint.getValue(stereotype,
- "statusCode");
+ Integer statusCode = (Integer)constraint.getValue(stereotype, "statusCode");
return statusCode == null ? new Integer(1) : statusCode;
}
@@ -169,16 +162,15 @@ public class ValidationRuleImpl implements IValidationRule {
public Severity getSeverity() {
// TODO Auto-generated method stub
- EnumerationLiteralImpl severity = (EnumerationLiteralImpl) constraint
- .getValue(stereotype, "severity");
+ EnumerationLiteral severity = (EnumerationLiteral)constraint.getValue(stereotype, "severity");
String severityType = severity.getName();
- if (severityType.compareTo(Severity.INFO.name()) == 0) {
+ if(severityType.compareTo(Severity.INFO.name()) == 0) {
return Severity.INFO;
- } else if (severityType.compareTo(Severity.WARNING.name()) == 0) {
+ } else if(severityType.compareTo(Severity.WARNING.name()) == 0) {
return Severity.WARNING;
- } else if (severityType.compareTo(Severity.CANCEL.name()) == 0) {
+ } else if(severityType.compareTo(Severity.CANCEL.name()) == 0) {
return Severity.CANCEL;
}
@@ -194,14 +186,13 @@ public class ValidationRuleImpl implements IValidationRule {
public Mode getMode() {
// TODO Auto-generated method stub
- EnumerationLiteralImpl mode = (EnumerationLiteralImpl) constraint
- .getValue(stereotype, "mode");
+ EnumerationLiteral mode = (EnumerationLiteral)constraint.getValue(stereotype, "mode");
String modeType = mode.getName();
- if (modeType.compareTo(Mode.Batch.name()) == 0) {
+ if(modeType.compareTo(Mode.Batch.name()) == 0) {
return Mode.Batch;
- } else if (modeType.compareTo(Mode.Live.name()) == 0) {
+ } else if(modeType.compareTo(Mode.Live.name()) == 0) {
return Mode.Live;
}
@@ -210,19 +201,17 @@ public class ValidationRuleImpl implements IValidationRule {
public boolean isEnabledByDefault() {
// TODO Auto-generated method stub
- return constraint.getValue(stereotype, "isEnabledByDefault") == null ? true
- : ((Boolean) constraint.getValue(stereotype,
- "isEnabledByDefault")).booleanValue();
+ return constraint.getValue(stereotype, "isEnabledByDefault") == null ? true : ((Boolean)constraint.getValue(stereotype, "isEnabledByDefault")).booleanValue();
}
public String getMessage() {
// TODO Auto-generated method stub
- return (String) constraint.getValue(stereotype, "message");
+ return (String)constraint.getValue(stereotype, "message");
}
public String getDescription() {
// TODO Auto-generated method stub
- return (String) constraint.getValue(stereotype, "description");
+ return (String)constraint.getValue(stereotype, "description");
}
public List<String> getTargets() {
@@ -230,7 +219,7 @@ public class ValidationRuleImpl implements IValidationRule {
return this.targets;
}
-
+
public Constraint getConstraint() {
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java
index cccdbae6269..9d367dcfa6e 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java
@@ -13,7 +13,7 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -22,8 +22,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -31,8 +33,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
@@ -40,7 +44,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/META-INF/MANIFEST.MF b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/META-INF/MANIFEST.MF
index ae7d9089668..8d085007eca 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/META-INF/MANIFEST.MF
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/META-INF/MANIFEST.MF
@@ -6,12 +6,12 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.pde.ui;bundle-version="3.6.100",
org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.papyrus.customization;bundle-version="0.10.0",
org.eclipse.papyrus.eclipse.project.editors;bundle-version="0.10.0",
org.eclipse.papyrus.dsml.validation.model;bundle-version="0.10.0",
org.eclipse.uml2.uml;bundle-version="3.2.100",
org.eclipse.papyrus.dsml.validation.generator;bundle-version="0.10.0",
- org.eclipse.acceleo.engine;bundle-version="3.1.1"
+ org.eclipse.acceleo.engine;bundle-version="3.1.1",
+ org.eclipse.papyrus.customization;bundle-version="0.10.0"
Export-Package: org.eclipse.papyrus.dsml.validation.generation.wizard
Bundle-Vendor: %pluginProvider
Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/build.properties b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/build.properties
index 8665ac2ffec..a8e3182967e 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/build.properties
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/build.properties
@@ -2,5 +2,6 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/Activator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/Activator.java
index 245d5e77299..544a20ac5f2 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/Activator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/Activator.java
@@ -38,6 +38,7 @@ public class Activator extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -50,6 +51,7 @@ public class Activator extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/CreateEMFValidationProject.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/CreateEMFValidationProject.java
index 952eac6da40..53a4ffff4df 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/CreateEMFValidationProject.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/CreateEMFValidationProject.java
@@ -14,14 +14,9 @@ package org.eclipse.papyrus.dsml.validation.generation.wizard;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintProvider;
-import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsCategory;
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager;
-import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IValidationRule;
-import org.eclipse.papyrus.dsml.validation.model.profilenames.Utils;
import org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
@@ -44,22 +39,22 @@ public class CreateEMFValidationProject extends NewPluginProjectWizard {
private Profile selectedProfile;
- private EPackage definition=null;
+
+ private EPackage definition = null;
/**
*
* Constructor.
- *
+ *
* @param selectedProfile
* @param constraintsExtractor
*/
- public CreateEMFValidationProject(Profile selectedProfile,
- IConstraintsManager constraintsExtractor, EPackage definition) {
+ public CreateEMFValidationProject(Profile selectedProfile, IConstraintsManager constraintsExtractor, EPackage definition) {
super();
setWindowTitle(GENERATION_MESSAGE);
this.constraintsManager = constraintsExtractor;
this.selectedProfile = selectedProfile;
- this.definition=definition;
+ this.definition = definition;
}
@Override
@@ -80,14 +75,14 @@ public class CreateEMFValidationProject extends NewPluginProjectWizard {
*/
public void openDialog() {
Shell frame = new Shell(SWT.SHELL_TRIM);
- WizardDialog dialog = new WizardDialog(frame, (IWizard) this);
+ WizardDialog dialog = new WizardDialog(frame, this);
dialog.open();
}
@Override
public boolean performFinish() {
boolean result = super.performFinish();
- if (result) {
+ if(result) {
IProject project = this.fMainPage.getProjectHandle();
try {
@@ -95,7 +90,7 @@ public class CreateEMFValidationProject extends NewPluginProjectWizard {
generateAllJava = new JavaContentGenerator(project, selectedProfile);
generateAllJava.run();
//generate plugin + extension point
- ValidationPluginGenerator.instance.generate(project, this,constraintsManager, definition);
+ ValidationPluginGenerator.instance.generate(project, this, constraintsManager, definition);
project.refreshLocal(IProject.DEPTH_INFINITE, null);
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/interfaces/IValidationPluginGenerator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/interfaces/IValidationPluginGenerator.java
index 7b5757a5a20..093e2a601dd 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/interfaces/IValidationPluginGenerator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/interfaces/IValidationPluginGenerator.java
@@ -19,7 +19,6 @@ public interface IValidationPluginGenerator {
final static String PLUGIN_NATURE_ID = "org.eclipse.pde.PluginNature";
- public void generate(IProject project, NewPluginProjectWizard wizard,
- IConstraintsManager constraintsManager);
+ public void generate(IProject project, NewPluginProjectWizard wizard, IConstraintsManager constraintsManager);
}
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation/src/org/eclipse/papyrus/dsml/validation/Activator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation/src/org/eclipse/papyrus/dsml/validation/Activator.java
index 36ecf3ed9e5..90236959187 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation/src/org/eclipse/papyrus/dsml/validation/Activator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation/src/org/eclipse/papyrus/dsml/validation/Activator.java
@@ -15,7 +15,7 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -24,8 +24,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -33,8 +35,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
@@ -42,7 +46,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
diff --git a/features/papyrus-extra-features/org.eclipse.papyrus.extra.build.feature/feature.xml b/features/papyrus-extra-features/org.eclipse.papyrus.extra.build.feature/feature.xml
index af9a53a0b54..54179d221aa 100644
--- a/features/papyrus-extra-features/org.eclipse.papyrus.extra.build.feature/feature.xml
+++ b/features/papyrus-extra-features/org.eclipse.papyrus.extra.build.feature/feature.xml
@@ -103,7 +103,9 @@ http://www.eclipse.org/legal/epl-v10.html
<includes
id="org.eclipse.papyrus.extra.eastadl.feature"
version="0.0.0"/>
-
- <import feature="org.eclipse.papyrus.extra.eastadl.source.feature" version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.extra.dsml.validation.feature"
+ version="0.0.0"/>
</feature>
diff --git a/features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature/feature.xml b/features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature/feature.xml
index 161afbf0e82..9be84a1ca37 100644
--- a/features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature/feature.xml
+++ b/features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature/feature.xml
@@ -1,11 +1,16 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.extra.dsml.validation.feature" label="%featureName" provider-name="%providerName" version="0.9.2.qualifier">
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.extra.dsml.validation.feature"
+ label="%featureName"
+ version="0.10.0.qualifier"
+ provider-name="%providerName">
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
- Copyright (c) 2012 CEA LIST
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License
-v1.0
-which accompanies this distribution, and is available at
+ Copyright (c) 2012 CEA LIST
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
</copyright>
@@ -13,20 +18,60 @@ http://www.eclipse.org/legal/epl-v10.html
%license
</license>
- <includes id="org.eclipse.papyrus.dsml.validation.generator.feature" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.dsml.validation"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.dsml.validation" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.dsml.validation.model"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.dsml.validation.model" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.dsml.validation.properties"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.dsml.validation.properties" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.dsml.validation.wizard"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.dsml.validation.wizard" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.eclipse.project.editors"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.eclipse.project.editors" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.dsml.validation.model.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.dsml.validation.model.ui" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.customization"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin download-size="0" id="org.eclipse.papyrus.customization" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.dsml.validation.generator"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
-</feature> \ No newline at end of file
+</feature>
diff --git a/features/papyrus-extra-features/org.eclipse.papyrus.extra.feature/feature.xml b/features/papyrus-extra-features/org.eclipse.papyrus.extra.feature/feature.xml
index f3a4c53eb3b..85ec817b547 100644
--- a/features/papyrus-extra-features/org.eclipse.papyrus.extra.feature/feature.xml
+++ b/features/papyrus-extra-features/org.eclipse.papyrus.extra.feature/feature.xml
@@ -40,6 +40,7 @@ http://www.eclipse.org/legal/epl-v10.html
<import feature="org.eclipse.papyrus.extra.marte.properties.feature"/>
<import feature="org.eclipse.papyrus.extra.marte.textedit.feature"/>
<import feature="org.eclipse.papyrus.extra.eastadl.feature"/>
+ <import feature="org.eclipse.papyrus.extra.dsml.validation.feature" version="0.10.0.qualifier"/>
</requires>
</feature>

Back to the top