Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-06-18 07:04:16 -0400
committercletavernie2013-06-18 07:04:16 -0400
commit67a09f433ec1cbeff780092017078b363a28d33a (patch)
tree28626f9fcc2e7db1f77207a73a90aec6dbdd3876
parent784a19f1b4e872d1e5cace2124baaf110f927096 (diff)
downloadorg.eclipse.papyrus-67a09f433ec1cbeff780092017078b363a28d33a.tar.gz
org.eclipse.papyrus-67a09f433ec1cbeff780092017078b363a28d33a.tar.xz
org.eclipse.papyrus-67a09f433ec1cbeff780092017078b363a28d33a.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 Fix plug-in IDs and package names
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java39
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model/src/org/eclipse/papyrus/dsml/validation/model/Activator.java2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/META-INF/MANIFEST.MF5
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/Activator.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/Activator.java)4
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ClassesGenerator.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ClassesGenerator.java)2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/CreateEMFValidationProject.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/CreateEMFValidationProject.java)2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/JavaContentGenerator.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/JavaContentGenerator.java)2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationClassesGenerator.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ValidationClassesGenerator.java)2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ValidationPluginGenerator.java)2
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/interfaces/IValidationPluginGenerator.java (renamed from extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/interfaces/IValidationPluginGenerator.java)2
10 files changed, 30 insertions, 32 deletions
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java
index 32894b8c49b..184c3371c67 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui/src/org/eclipse/papyrus/dsml/validation/generation/ui/CreateJavaValidationPluginHandler.java
@@ -19,22 +19,21 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.dsml.validation.generation.wizard.CreateEMFValidationProject;
import org.eclipse.papyrus.dsml.validation.model.elements.impl.ConstraintManagerImpl;
-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.papyrus.dsml.validation.model.profilenames.Utils;
+import org.eclipse.papyrus.dsml.validation.wizard.CreateEMFValidationProject;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Profile;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
/**
* this handler launch the creation of the plugin to validate contraints of the profile
- *
+ *
*/
public class CreateJavaValidationPluginHandler extends AbstractHandler {
@@ -83,7 +82,7 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
/**
*
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- *
+ *
* @param event
* @return null
* @throws ExecutionException
@@ -91,26 +90,26 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
public Object execute(ExecutionEvent event) throws ExecutionException {
EObject selection = getSelectedElement();
- if( selection instanceof Profile){
- Profile profileSelection= (Profile)selection;
+ if(selection instanceof Profile) {
+ Profile profileSelection = (Profile)selection;
constraintsManager = new ConstraintManagerImpl(profileSelection);
- boolean isOCLConstraint=false;
- for (IConstraintProvider constraintProvider : constraintsManager.getConstraintsProviders()) {
- for (IConstraintsCategory constraintCategory : constraintProvider.getConstraintsCategories()) {
- for (IValidationRule constraint : constraintCategory.getConstraints()) {
+ boolean isOCLConstraint = false;
+ for(IConstraintProvider constraintProvider : constraintsManager.getConstraintsProviders()) {
+ for(IConstraintsCategory constraintCategory : constraintProvider.getConstraintsCategories()) {
+ for(IValidationRule constraint : constraintCategory.getConstraints()) {
//this is an OCL constraint?
- if (Utils.hasSpecificationForOCL(constraint.getConstraint())) {
- isOCLConstraint=true;
+ if(Utils.hasSpecificationForOCL(constraint.getConstraint())) {
+ isOCLConstraint = true;
}
}
}
}
- EPackage definition=null;
- if(isOCLConstraint){
- definition=profileSelection.getDefinition();
- if(definition==null){
- NotificationBuilder errorDialog=NotificationBuilder.createErrorPopup("The profile must be defined in order to generate OCL Constraints");
+ EPackage definition = null;
+ if(isOCLConstraint) {
+ definition = profileSelection.getDefinition();
+ if(definition == null) {
+ NotificationBuilder errorDialog = NotificationBuilder.createErrorPopup("The profile must be defined in order to generate OCL Constraints");
errorDialog.run();
//finish by displaying a message for the user to informa that it need to define it before to launch it.
return null;
@@ -124,8 +123,8 @@ public class CreateJavaValidationPluginHandler extends AbstractHandler {
@Override
public boolean isEnabled() {
- EObject eObject=getSelectedElement();
- if( eObject instanceof Profile){
+ EObject eObject = getSelectedElement();
+ if(eObject instanceof Profile) {
return true;
}
return false;
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 f063b26d1e7..7e31913dbe6 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
@@ -22,7 +22,7 @@ public class Activator extends AbstractUIPlugin {
/**
* PluginID
* */
- public static final String PLUGIN_ID = "org.eclipse.ccpg.utils_incubation_"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.validation.model"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
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 8d085007eca..5ab8ca6ade1 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
@@ -12,15 +12,14 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.dsml.validation.generator;bundle-version="0.10.0",
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
+Export-Package: org.eclipse.papyrus.dsml.validation.wizard
Bundle-Vendor: %pluginProvider
Bundle-ActivationPolicy: lazy
Bundle-Version: 0.10.0.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.dsml.validation.generation.wizar
- d.Activator
+Bundle-Activator: org.eclipse.papyrus.dsml.validation.wizard.Activator
Bundle-SymbolicName: org.eclipse.papyrus.dsml.validation.wizard;single
ton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
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/wizard/Activator.java
index 544a20ac5f2..a52f070b842 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/wizard/Activator.java
@@ -9,7 +9,7 @@
* Contributors:
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard;
+package org.eclipse.papyrus.dsml.validation.wizard;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.ccpg.wizard_incubation_"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.dsml.validation.wizard"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ClassesGenerator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ClassesGenerator.java
index d333e9f0b22..666f04627e2 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ClassesGenerator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ClassesGenerator.java
@@ -9,7 +9,7 @@
* Contributors:
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard;
+package org.eclipse.papyrus.dsml.validation.wizard;
import java.io.IOException;
import java.util.ArrayList;
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/wizard/CreateEMFValidationProject.java
index 53a4ffff4df..1a619b64ee5 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/wizard/CreateEMFValidationProject.java
@@ -10,7 +10,7 @@
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
* Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - modification
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard;
+package org.eclipse.papyrus.dsml.validation.wizard;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.ecore.EPackage;
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/JavaContentGenerator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/JavaContentGenerator.java
index 5374c79ac3e..101e9eb5289 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/JavaContentGenerator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/JavaContentGenerator.java
@@ -10,7 +10,7 @@
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
* Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - modification
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard;
+package org.eclipse.papyrus.dsml.validation.wizard;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ValidationClassesGenerator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationClassesGenerator.java
index 22a3246da2c..e0e8884335a 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ValidationClassesGenerator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationClassesGenerator.java
@@ -9,7 +9,7 @@
* Contributors:
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard;
+package org.eclipse.papyrus.dsml.validation.wizard;
public class ValidationClassesGenerator {
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ValidationPluginGenerator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java
index 1dc04509015..d138ffd9772 100644
--- a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/generation/wizard/ValidationPluginGenerator.java
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard/src/org/eclipse/papyrus/dsml/validation/wizard/ValidationPluginGenerator.java
@@ -10,7 +10,7 @@
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
* Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - modification
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard;
+package org.eclipse.papyrus.dsml.validation.wizard;
import java.io.File;
import java.io.IOException;
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/wizard/interfaces/IValidationPluginGenerator.java
index 093e2a601dd..abf8f59731b 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/wizard/interfaces/IValidationPluginGenerator.java
@@ -9,7 +9,7 @@
* Contributors:
* Ernest Wozniak (CEA LIST) ernest.wozniak@cea.fr - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.dsml.validation.generation.wizard.interfaces;
+package org.eclipse.papyrus.dsml.validation.wizard.interfaces;
import org.eclipse.core.resources.IProject;
import org.eclipse.papyrus.dsml.validation.model.elements.interfaces.IConstraintsManager;

Back to the top