Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-03-27 18:30:28 +0000
committerptessier2014-03-27 18:30:28 +0000
commitf82b0570c4d188420a753ab8c15e69b8bf5841c6 (patch)
tree80b4408c4e014cbad2d4e078d31c53f4e241b167 /extraplugins/adl4eclipse
parent09d29d2bc9abd2fe27d4a5f52e15588bb8817627 (diff)
downloadorg.eclipse.papyrus-f82b0570c4d188420a753ab8c15e69b8bf5841c6.tar.gz
org.eclipse.papyrus-f82b0570c4d188420a753ab8c15e69b8bf5841c6.tar.xz
org.eclipse.papyrus-f82b0570c4d188420a753ab8c15e69b8bf5841c6.zip
351803: [New Child] Papyrus shall provide a customizable "New Child"
menu https://bugs.eclipse.org/bugs/show_bug.cgi?id=351803 add doc and adapt ADL4Eclipse
Diffstat (limited to 'extraplugins/adl4eclipse')
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/AdvancePluginImport.java15
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimplePluginImport.java12
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/META-INF/MANIFEST.MF2
6 files changed, 11 insertions, 24 deletions
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/META-INF/MANIFEST.MF b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/META-INF/MANIFEST.MF
index e8e1f3de508..41708bc08f7 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/META-INF/MANIFEST.MF
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.osgi.profile;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.10.1.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.adl4eclipse.org.Activator
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/META-INF/MANIFEST.MF b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/META-INF/MANIFEST.MF
index 2cff5994b6b..ba58e8f3e28 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/META-INF/MANIFEST.MF
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/META-INF/MANIFEST.MF
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.adl4eclipsetool;bundle-version="1.0.0",
org.eclipse.pde.core
Bundle-Vendor: %providerName
-Bundle-Version: 0.10.1.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.adltool.assistant.Activator
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/AdvancePluginImport.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/AdvancePluginImport.java
index 6bc31b2c56f..283c0019c30 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/AdvancePluginImport.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/AdvancePluginImport.java
@@ -32,6 +32,7 @@ import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
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.EMFHelper;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
import org.eclipse.ui.IImportWizard;
import org.eclipse.ui.ISelectionService;
@@ -128,17 +129,9 @@ public class AdvancePluginImport extends Wizard implements IImportWizard {
Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
while (selectedobjectIteractor.hasNext()) {
Object currentSelection = selectedobjectIteractor.next();
- if(currentSelection instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)currentSelection).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedSet.add( (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement());
- }
- }
- else if(currentSelection instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)currentSelection).getAdapter(EObject.class);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedSet.add((Element)selectedEObject);
- }
+ EObject selectedEObject = EMFHelper.getEObject(currentSelection);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
+ selectedSet.add((Element)selectedEObject);
}
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimplePluginImport.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimplePluginImport.java
index 36ca3d8fc73..32aa67b058e 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimplePluginImport.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimplePluginImport.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
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.EMFHelper;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
import org.eclipse.ui.IImportWizard;
import org.eclipse.ui.ISelectionService;
@@ -127,21 +128,14 @@ public class SimplePluginImport extends Wizard implements IImportWizard {
Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
while (selectedobjectIteractor.hasNext()) {
Object currentSelection = selectedobjectIteractor.next();
- if(currentSelection instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)currentSelection).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedSet.add( (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement());
- }
- }
- else if(currentSelection instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)currentSelection).getAdapter(EObject.class);
+
+ EObject selectedEObject = EMFHelper.getEObject(currentSelection);
if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
selectedSet.add((Element)selectedEObject);
}
}
}
- }
return selectedSet;
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/META-INF/MANIFEST.MF b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/META-INF/MANIFEST.MF
index 581e365a02e..17ec720f1a2 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/META-INF/MANIFEST.MF
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@ Export-Package: org.eclipse.papyrus.adltool,
org.eclipse.papyrus.adltool.designer.wizard
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.10.1.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.adltool.Activator
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/META-INF/MANIFEST.MF b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/META-INF/MANIFEST.MF
index 1991034cd0e..a604b26841a 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/META-INF/MANIFEST.MF
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.10.1.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.osgi.profile.Activator

Back to the top