Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2013-06-19 11:35:56 +0000
committerptessier2013-06-19 11:35:56 +0000
commit4f1dd13e33c672a02886fcc9ec372cbcb4561d37 (patch)
tree3d19925e690cc05e5e6337e6b03e37bcc5a056b8 /extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant
parentacad061cbb9ee2c3e0948ebd2fe3bfb80f4a7ac9 (diff)
downloadorg.eclipse.papyrus-4f1dd13e33c672a02886fcc9ec372cbcb4561d37.tar.gz
org.eclipse.papyrus-4f1dd13e33c672a02886fcc9ec372cbcb4561d37.tar.xz
org.eclipse.papyrus-4f1dd13e33c672a02886fcc9ec372cbcb4561d37.zip
401703: Create adl4eclipse profile
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401703
Diffstat (limited to 'extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant')
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/plugin.xml54
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompleteFeatureArchitectureHandler.java78
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java (renamed from extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/CompleteArchitectureHandler.java)13
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelFeatureArchitectureFromWorkspaceHandler.java78
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java (renamed from extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/SimpleArchitecrureHandler.java)12
5 files changed, 208 insertions, 27 deletions
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/plugin.xml b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/plugin.xml
index b49d94fdaa0..2f76edd5d0b 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/plugin.xml
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/plugin.xml
@@ -20,18 +20,32 @@
allPopups="false"
locationURI="popup:com.cea.papyrus.adl4eclipse.menu">
<command
- commandId="org.eclipse.papyrus.adltool.assistant.BundlesImportHandler"
- id="org.eclipse.papyrus.adltool.assistant.BundlesImportHandler.popup"
- label="Simple Architecture Snapshot"
+ commandId="org.eclipse.papyrus.adltool.assistant.SimplePluginModelHandler"
+ id="org.eclipse.papyrus.adltool.assistant.SimplePluginModelHandler.popup"
+ label="Model plugin architecture from Workspace"
style="push"
- tooltip="Architecture Snapshot from the workspace">
+ tooltip="Model Plugin Architecture from Workspace">
</command>
<command
- commandId="org.eclipse.papyrus.adltool.assistant.CompleteArchitectureHandler"
- id="org.eclipse.papyrus.adltool.assistant.CompleteArchitectureHandler.popup"
- label="Complete Architecture Snapshot"
+ commandId="org.eclipse.papyrus.adltool.assistant.CompletePluginModelHandler"
+ id="org.eclipse.papyrus.adltool.assistantCompletePluginModelHandler.popup"
+ label="Model plugin architecture from all possible plugins"
style="push"
- tooltip="Architecture Snapshot from the workspace">
+ tooltip="Model Plugin Architecture from all possible plugins (workpace + platform)">
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.adltool.assistant.SimpleFeatureModelHandler"
+ id="org.eclipse.papyrus.adltool.assistant.SimpleFeatureModelHandler.popup"
+ label="Model features architecture from Workspace"
+ style="push"
+ tooltip="Model features architecture from Workspace">
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.adltool.assistant.ModelCompleteFeatureArchitectureHandler"
+ id="org.eclipse.papyrus.adltool.assistant.ModelCompleteFeatureArchitectureHandler.popup"
+ label="Model features architecture"
+ style="push"
+ tooltip="Model features architecture ( Workspace + Platform)">
</command>
</menuContribution>
</extension>
@@ -39,15 +53,27 @@
point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.papyrus.editor.category"
- defaultHandler="org.eclipse.papyrus.adltool.assistant.SimpleArchitecrureHandler"
- id="org.eclipse.papyrus.adltool.assistant.BundlesImportHandler"
- name="Simple Architecture Snapshot">
+ defaultHandler="org.eclipse.papyrus.adltool.assistant.ModelPluginArchitectureFromWorkspaceHandler"
+ id="org.eclipse.papyrus.adltool.assistant.SimplePluginModelHandler"
+ name="Simple plugins architecture snapshot">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ defaultHandler="org.eclipse.papyrus.adltool.assistant.ModelCompletePluginArchitectureHandler"
+ id="org.eclipse.papyrus.adltool.assistant.CompletePluginModelHandler"
+ name="Complete plugins architecture snapshot">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ defaultHandler="org.eclipse.papyrus.adltool.assistant.ModelFeatureArchitectureFromWorkspaceHandler"
+ id="org.eclipse.papyrus.adltool.assistant.SimpleFeatureModelHandler"
+ name="Simple Feature architecture snapshot">
</command>
<command
categoryId="org.eclipse.papyrus.editor.category"
- defaultHandler="org.eclipse.papyrus.adltool.assistant.CompleteArchitectureHandler"
- id="org.eclipse.papyrus.adltool.assistant.CompleteArchitectureHandler"
- name="Complete Architecture Snapshot">
+ defaultHandler="org.eclipse.papyrus.adltool.assistant.ModelCompleteFeatureArchitectureHandler"
+ id="org.eclipse.papyrus.adltool.assistant.ModelCompleteFeatureArchitectureHandler"
+ name="Complete Feature architecture snapshot">
</command>
</extension>
<extension
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompleteFeatureArchitectureHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompleteFeatureArchitectureHandler.java
new file mode 100644
index 00000000000..0d8d5521c7e
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompleteFeatureArchitectureHandler.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.adltool.assistant;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.adltool.command.CompleteFeaturesArchitectureSnapshotCommand;
+import org.eclipse.papyrus.adltool.designer.wizard.FeatureArchitectureWizard;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+
+
+/**
+ * this handler is used to generate the feature and plugin architecture from workspace
+ *
+ */
+public class ModelCompleteFeatureArchitectureHandler extends ADLToolAbstractHandler {
+
+ public ModelCompleteFeatureArchitectureHandler() {
+ }
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Element selectedElement=getSelection();
+ ServicesRegistry registry=null;
+ try {
+ registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
+ } catch (ServiceException e1) {
+ e1.printStackTrace();
+ }
+ ModelSet modelSet;
+ try {
+ modelSet = registry.getService(ModelSet.class);
+ } catch (ServiceException e) {
+ throw new ExecutionException("Can't get ModelSet", e);
+ }
+ FeatureArchitectureWizard bWizard=new FeatureArchitectureWizard(false);
+ WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
+ if (wizardDialog.open() == Window.OK) {
+ TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
+ if( selectedElement instanceof Package){
+ CompleteFeaturesArchitectureSnapshotCommand comd= new CompleteFeaturesArchitectureSnapshotCommand(dom, (Package)selectedElement, bWizard.getSelectedBundle());
+ dom.getCommandStack().execute(comd);
+ }
+ }
+
+
+ return null;
+ }
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/CompleteArchitectureHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java
index 0ce0182e9ce..dbc46fb4c53 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/CompleteArchitectureHandler.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java
@@ -19,9 +19,8 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.adltool.command.CompleteArchitectureSnapshotCommand;
-import org.eclipse.papyrus.adltool.command.SimpleArchitectureSnapshotCommand;
-import org.eclipse.papyrus.adltool.designer.wizard.BundleArchitectureWizard;
+import org.eclipse.papyrus.adltool.command.CompletePluginsArchitectureSnapshotCommand;
+import org.eclipse.papyrus.adltool.designer.wizard.PluginArchitectureWizard;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
@@ -32,9 +31,9 @@ import org.eclipse.uml2.uml.Package;
-public class CompleteArchitectureHandler extends ADLToolAbstractHandler {
+public class ModelCompletePluginArchitectureHandler extends ADLToolAbstractHandler {
- public CompleteArchitectureHandler() {
+ public ModelCompletePluginArchitectureHandler() {
}
public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -51,12 +50,12 @@ public class CompleteArchitectureHandler extends ADLToolAbstractHandler {
} catch (ServiceException e) {
throw new ExecutionException("Can't get ModelSet", e);
}
- BundleArchitectureWizard bWizard=new BundleArchitectureWizard(false);
+ PluginArchitectureWizard bWizard=new PluginArchitectureWizard(false);
WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
if (wizardDialog.open() == Window.OK) {
TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
if( selectedElement instanceof Package){
- CompleteArchitectureSnapshotCommand comd= new CompleteArchitectureSnapshotCommand(dom, (Package)selectedElement,bWizard.getSelectedBundle());
+ CompletePluginsArchitectureSnapshotCommand comd= new CompletePluginsArchitectureSnapshotCommand(dom, (Package)selectedElement,bWizard.getSelectedBundle());
dom.getCommandStack().execute(comd);
}
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelFeatureArchitectureFromWorkspaceHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelFeatureArchitectureFromWorkspaceHandler.java
new file mode 100644
index 00000000000..012376f3fb7
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelFeatureArchitectureFromWorkspaceHandler.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.adltool.assistant;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.adltool.command.SimpleFeaturesArchitectureSnapshotCommand;
+import org.eclipse.papyrus.adltool.designer.wizard.FeatureArchitectureWizard;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+
+
+/**
+ * this handler is used to generate the feature and plugin architecture from workspace
+ *
+ */
+public class ModelFeatureArchitectureFromWorkspaceHandler extends ADLToolAbstractHandler {
+
+ public ModelFeatureArchitectureFromWorkspaceHandler() {
+ }
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Element selectedElement=getSelection();
+ ServicesRegistry registry=null;
+ try {
+ registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
+ } catch (ServiceException e1) {
+ e1.printStackTrace();
+ }
+ ModelSet modelSet;
+ try {
+ modelSet = registry.getService(ModelSet.class);
+ } catch (ServiceException e) {
+ throw new ExecutionException("Can't get ModelSet", e);
+ }
+ FeatureArchitectureWizard bWizard=new FeatureArchitectureWizard(true);
+ WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
+ if (wizardDialog.open() == Window.OK) {
+ TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
+ if( selectedElement instanceof Package){
+ SimpleFeaturesArchitectureSnapshotCommand comd= new SimpleFeaturesArchitectureSnapshotCommand(dom, (Package)selectedElement, bWizard.getSelectedBundle());
+ dom.getCommandStack().execute(comd);
+ }
+ }
+
+
+ return null;
+ }
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/SimpleArchitecrureHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java
index 382fbe5853e..2f870f942fc 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/SimpleArchitecrureHandler.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java
@@ -18,8 +18,8 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.adltool.command.SimpleArchitectureSnapshotCommand;
-import org.eclipse.papyrus.adltool.designer.wizard.BundleArchitectureWizard;
+import org.eclipse.papyrus.adltool.command.SimplePluginsArchitectureSnapshotCommand;
+import org.eclipse.papyrus.adltool.designer.wizard.PluginArchitectureWizard;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
@@ -33,9 +33,9 @@ import org.eclipse.uml2.uml.Package;
* this handler is used to generate the architecture from workspace
*
*/
-public class SimpleArchitecrureHandler extends ADLToolAbstractHandler {
+public class ModelPluginArchitectureFromWorkspaceHandler extends ADLToolAbstractHandler {
- public SimpleArchitecrureHandler() {
+ public ModelPluginArchitectureFromWorkspaceHandler() {
}
public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -52,12 +52,12 @@ public class SimpleArchitecrureHandler extends ADLToolAbstractHandler {
} catch (ServiceException e) {
throw new ExecutionException("Can't get ModelSet", e);
}
- BundleArchitectureWizard bWizard=new BundleArchitectureWizard(true);
+ PluginArchitectureWizard bWizard=new PluginArchitectureWizard(true);
WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
if (wizardDialog.open() == Window.OK) {
TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
if( selectedElement instanceof Package){
- SimpleArchitectureSnapshotCommand comd= new SimpleArchitectureSnapshotCommand(dom, (Package)selectedElement, bWizard.getSelectedBundle());
+ SimplePluginsArchitectureSnapshotCommand comd= new SimplePluginsArchitectureSnapshotCommand(dom, (Package)selectedElement, bWizard.getSelectedBundle());
dom.getCommandStack().execute(comd);
}
}

Back to the top