Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauricio Alferez2016-07-07 15:33:05 +0000
committerGerrit Code Review @ Eclipse.org2016-07-12 07:43:32 +0000
commitf2d0367bf3fcfba6a5dbb6c597e346af6fd96666 (patch)
tree06b8a4bb06a8cbb1e90633f44a3dc58bd00bd80e /extraplugins
parent200cbb5748916344ac2dcd9163a39f6d6a4b01d5 (diff)
downloadorg.eclipse.papyrus-f2d0367bf3fcfba6a5dbb6c597e346af6fd96666.tar.gz
org.eclipse.papyrus-f2d0367bf3fcfba6a5dbb6c597e346af6fd96666.tar.xz
org.eclipse.papyrus-f2d0367bf3fcfba6a5dbb6c597e346af6fd96666.zip
Bug 497501 - [Extra][Requirements] Generate a profile shall allow to
choose the source domain model Change-Id: Ib274d32f1f7025352cc7176fdaf898bbeb3bbd41 Signed-off-by: Mauricio Alferez <mauricio.alferez@cea.fr>
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java9
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java2
3 files changed, 6 insertions, 9 deletions
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java
index 289cfc29654..c5aebc9ae71 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java
@@ -21,13 +21,12 @@ import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
import org.eclipse.swt.widgets.Display;
import org.eclipse.uml2.uml.Element;
-//import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLPackage;
/**
* Executes the generation of a profile based on a class diagram according to
- * the preferences page of Papyrus Req
+ * the preferences page of Papyrus for Requirements
*
*/
public class InitCreateProfileFromDomainModelCommand extends RecordingCommand {
@@ -44,10 +43,9 @@ public class InitCreateProfileFromDomainModelCommand extends RecordingCommand {
protected void doExecute() {
Package sourcePackage = null;
if (!(selectedElement instanceof Package)) {
- org.eclipse.uml2.uml.Package _package = (Package) selectedElement;
TreeSelectorDialog dialog = new TreeSelectorDialog(Display.getDefault().getActiveShell());
dialog.setContentProvider(
- new UMLContentProvider(_package, UMLPackage.eINSTANCE.getPackage_NestedPackage()));
+ new UMLContentProvider(selectedElement.getModel(), UMLPackage.eINSTANCE.getPackage_NestedPackage()));
dialog.setLabelProvider(new UMLLabelProvider());
dialog.setMessage("Choose the domain model");
dialog.setTitle("Choose the domain model");
@@ -62,8 +60,7 @@ public class InitCreateProfileFromDomainModelCommand extends RecordingCommand {
CreateProfileFromDomainModelCommand createProfileFromDomainModelCommand = new CreateProfileFromDomainModelCommand(
domain, sourcePackage);
createProfileFromDomainModelCommand.execute();
- }
- else {
+ } else {
sourcePackage = (Package) selectedElement;
CreateProfileFromDomainModelCommand createProfileFromDomainModelCommand = new CreateProfileFromDomainModelCommand(
domain, sourcePackage);
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java
index 45a32740a0f..84650a0f625 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java
@@ -93,7 +93,7 @@ public class ProfileGenerator {
/**
* Constructor to be called by Eclipse, takes into account generation
- * preferences in the Papyrus Req preference page.
+ * preferences in the Papyrus for Requirements preference page.
*
* @param selectedPackage The UML domain model
*/
@@ -119,7 +119,7 @@ public class ProfileGenerator {
/**
* Constructor to be used in an standalone Java application. It does not takes
- * into account preferences in the Papyrus Req preference page.
+ * into account preferences in the Papyrus for Requirements preference page.
*
* @param _inputModelPath The path of the input model
* @param _outputDirectoryPath The path to save the profile and if the abstractions model
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java
index 39f4869debd..ad2fcb2a2be 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java
@@ -22,7 +22,7 @@ import org.eclipse.uml2.uml.Element;
/**
* Executes the generation of a profile based on a class diagram according to
- * the preferences page of Papyrus Req
+ * the preferences page of Papyrus for Requirements
*
*/
public class InitCreateInitialProfileFromDomainModelHandler extends PapyrusAbstractHandler {

Back to the top