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
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')
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteFeaturesArchitectureSnapshotCommand.java48
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java (renamed from extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteArchitectureSnapshotCommand.java)4
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleFeaturesArchitectureSnapshotCommand.java48
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java (renamed from extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleArchitectureSnapshotCommand.java)4
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/ArchitectureSnapshotDesigner.java291
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteArchitectureSnapshotDesigner.java5
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteFeatureArchitectureSnapshotDesigner.java66
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleArchitectureSnapshotDesigner.java15
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleFeatureArchitectureSnapshotDesigner.java53
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleDesignerRegistry.java18
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleLabelProvider.java5
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/FeatureDescriptionDesigner.java33
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/LoadedBundleDescriptionDesigner.java4
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/WorkspaceBundleDescriptionDesigner.java2
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/FeatureArchitectureWizard.java44
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java (renamed from extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleArchitectureWizard.java)9
16 files changed, 514 insertions, 135 deletions
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteFeaturesArchitectureSnapshotCommand.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteFeaturesArchitectureSnapshotCommand.java
new file mode 100644
index 00000000000..8001b072cab
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteFeaturesArchitectureSnapshotCommand.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * 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.command;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.adltool.designer.CompleteFeatureArchitectureSnapshotDesigner;
+import org.eclipse.uml2.uml.Package;
+
+
+/**
+ * this purpose of this comment is to import all the architecture from the currentworkspace
+ *
+ */
+public class CompleteFeaturesArchitectureSnapshotCommand extends RecordingCommand {
+
+ protected Package rootPackage;
+ protected ArrayList<Object> bundleList=null;
+
+ public CompleteFeaturesArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
+ super(domain,"Import Bundles", "Model Feature architecture from current workspace");
+ this.rootPackage=rootPackage;
+ this.bundleList=bundleList;
+ }
+
+
+
+ @Override
+ protected void doExecute() {
+ CompleteFeatureArchitectureSnapshotDesigner snapshotDesigner= new CompleteFeatureArchitectureSnapshotDesigner(rootPackage, bundleList);
+ snapshotDesigner.runImportBundles();
+ }
+
+
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteArchitectureSnapshotCommand.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java
index c3498b4b0ba..e175b651f7d 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteArchitectureSnapshotCommand.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java
@@ -25,11 +25,11 @@ import org.eclipse.uml2.uml.Package;
* this purpose of this comment is to import all the architecture from the currentworkspace
*
*/
-public class CompleteArchitectureSnapshotCommand extends RecordingCommand {
+public class CompletePluginsArchitectureSnapshotCommand extends RecordingCommand {
protected ArrayList<Object> bundleList=null;
protected Package rootPackage;
- public CompleteArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
+ public CompletePluginsArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
super(domain,"Import Bundles", "Model architecture from current workspace");
this.rootPackage=rootPackage;
this.bundleList=bundleList;
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleFeaturesArchitectureSnapshotCommand.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleFeaturesArchitectureSnapshotCommand.java
new file mode 100644
index 00000000000..c21c5541bea
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleFeaturesArchitectureSnapshotCommand.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * 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.command;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.adltool.designer.SimpleFeatureArchitectureSnapshotDesigner;
+import org.eclipse.uml2.uml.Package;
+
+
+/**
+ * this purpose of this comment is to import all the architecture from the currentworkspace
+ *
+ */
+public class SimpleFeaturesArchitectureSnapshotCommand extends RecordingCommand {
+
+ protected Package rootPackage;
+ protected ArrayList<Object> bundleList=null;
+
+ public SimpleFeaturesArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
+ super(domain,"Import Bundles", "Model Feature architecture from current workspace");
+ this.rootPackage=rootPackage;
+ this.bundleList=bundleList;
+ }
+
+
+
+ @Override
+ protected void doExecute() {
+ SimpleFeatureArchitectureSnapshotDesigner snapshotDesigner= new SimpleFeatureArchitectureSnapshotDesigner(rootPackage, bundleList);
+ snapshotDesigner.runImportBundles();
+ }
+
+
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleArchitectureSnapshotCommand.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java
index 4f6c5ed4e0d..0ece183e722 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleArchitectureSnapshotCommand.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java
@@ -25,12 +25,12 @@ import org.eclipse.uml2.uml.Package;
* this purpose of this comment is to import all the architecture from the currentworkspace
*
*/
-public class SimpleArchitectureSnapshotCommand extends RecordingCommand {
+public class SimplePluginsArchitectureSnapshotCommand extends RecordingCommand {
protected Package rootPackage;
protected ArrayList<Object> bundleList=null;
- public SimpleArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
+ public SimplePluginsArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
super(domain,"Import Bundles", "Model architecture from current workspace");
this.rootPackage=rootPackage;
this.bundleList=bundleList;
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/ArchitectureSnapshotDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/ArchitectureSnapshotDesigner.java
index 0e5f92292b9..efe620f1732 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/ArchitectureSnapshotDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/ArchitectureSnapshotDesigner.java
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.adltool.designer;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
@@ -32,6 +33,8 @@ import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.pde.core.project.IBundleProjectDescription;
import org.eclipse.pde.core.project.IBundleProjectService;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Package;
@@ -42,38 +45,50 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.VersionRange;
-
+//CreateFeatureProjectOperation
+//PDECore.getDefault().getFeatureModelManager()
/**
- * this purpose of this class is to provide mechanism to import bundle inot model
+ * this purpose of this class is to provide mechanism to import bundle into model
*
*/
public abstract class ArchitectureSnapshotDesigner{
protected HashMap<String, Component> createdBundleIndex=null;
protected HashMap<String, Object> bundlesIndex=null;
+ protected HashMap<String, Object> featureIndex=null;
protected BundleDesignerRegistry bundleDesignerRegistry=null;
protected int dependenciesN=0;
protected ArrayList<Object>bundleInitialList=null;
+
/**
* The key used to designate the buddy loader associated with a given bundle.
*/
protected Package rootPackage;
- public ArchitectureSnapshotDesigner (Package rootPackage) {
+ private ArchitectureSnapshotDesigner (Package rootPackage) {
this.rootPackage=rootPackage;
createdBundleIndex= new HashMap<String, Component>();
+ featureIndex= new HashMap<String, Object>();
bundleDesignerRegistry= new BundleDesignerRegistry();
}
+ /**
+ *
+ * Constructor.
+ *
+ * @param rootPackage
+ * @param bundleInitialList must not be null
+ */
public ArchitectureSnapshotDesigner (Package rootPackage, ArrayList<Object>bundleInitialList) {
this(rootPackage);
+ assert(bundleInitialList!=null);
this.bundleInitialList=bundleInitialList;
-
+
}
-
+
public abstract void runImportBundles();
/**
@@ -114,144 +129,194 @@ public abstract class ArchitectureSnapshotDesigner{
return bundleProjectList;
}
+ /**
+ *
+ * @return the list of bundle description contained in the workspace
+ */
+ public static ArrayList<Object>getWorkspaceFeature(){
+ ArrayList<Object> featureList= new ArrayList<Object>();
+ IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getWorkspaceModels();
+ featureList.addAll(Arrays.asList(featureModels));
+ return featureList;
+ }
-
+ /**
+ *
+ * @return the list of bundle description contained in the workspace
+ */
+ public static ArrayList<Object>getFeature(){
+ ArrayList<Object> featureList= new ArrayList<Object>();
+ IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getModels();
+ featureList.addAll(Arrays.asList(featureModels));
+ return featureList;
+ }
/**
* model all bundle contained in the workspaces
* @param pluginPackage the name of UML package that represent the plugin
*/
- protected void modelPlugins(Package pluginPackage){
+ protected void modelBundles(Package pluginPackage){
ArrayList<Object> bundleProjects= new ArrayList<Object>();
- if(bundleInitialList==null){
- bundleProjects.addAll(getWorkspaceBundle());
- }
- else{
- bundleProjects.addAll(bundleInitialList);
- }
+ bundleProjects.addAll(bundleInitialList);
Iterator<Object> bundleProjectsIterator= bundleProjects.iterator();
while(bundleProjectsIterator.hasNext()) {
Object bundleProject = (Object)bundleProjectsIterator.next();
- modelPlugin(pluginPackage, bundleProject);
+ modelBundle(pluginPackage, bundleProject);
}
System.out.println("created bundles numbers: "+createdBundleIndex.keySet().size());
System.out.println("dependenciess: "+dependenciesN);
}
+// protected void modelWorkspaceFeatures(Package pluginPackage, boolean createAll){
+// // IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getModels();
+// IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getWorkspaceModels();
+// for(int i = 0; i < featureModels.length; i++) {
+// modelAFeature(pluginPackage,featureModels[i], createAll);
+// }
+//
+// }
+// protected void modelPlatformFeatures(Package pluginPackage, boolean createAll){
+// // IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getModels();
+// IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getModels();
+// for(int i = 0; i < featureModels.length; i++) {
+// modelAFeature(pluginPackage,featureModels[i], createAll);
+// }
+//
+// }
+// protected void modelAFeature(Package pluginPackage, IFeatureModel featureModel, boolean createAll){
+//
+// Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
+// bundleComponent.setName(featureModel.getFeature().getId());
+// pluginPackage.getPackagedElements().add(bundleComponent);
+// Stereotype featureStereotype=bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.FEATURE_STEREOTYPE);
+// bundleComponent.applyStereotype(featureStereotype);
+// bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_ID_ATT,featureModel.getFeature().getId());
+// bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_VERSION_ATT,featureModel.getFeature().getVersion());
+// //bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_COPYRIGHT_ATT,featureModel.getFeature().getVersion());
+// //bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_DESCRIPTION_ATT,featureModel.getFeature().get);
+// bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_IMAGE_ATT,featureModel.getFeature().getImageName());
+// bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_LABEL_ATT,featureModel.getFeature().getLabel());
+// bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_LICENSE_ATT,featureModel.getFeature().getLicenseFeatureID());
+// bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_PROVIDER_ATT,featureModel.getFeature().getProviderName());
+// //bundleComponent.setValue(featureStereotype, IADL4ECLIPSE_Stereotype.FEATURE_URL_ATT,featureModel.getFeature().getURL());
+//
+// }
- /**
- * Model a bundle into the plugins packages:
- * <UL>
- * <LI> model the bundle as a stereotyped UML component
- * <LI>add links to required bundle
- * <LI> fill information about exported packages
- * </UL>
- *
- *
- * @param pluginPackage
- * @param bundleProjectsIterator
- */
- protected void modelPlugin(Package pluginPackage, Object bundleProject) {
-
- if(!createdBundleIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject))){
- Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
- System.out.println("-->"+bundleDesignerRegistry.getSymbolicName(bundleProject));
- bundleComponent.setName(bundleDesignerRegistry.getSymbolicName(bundleProject));
- pluginPackage.getPackagedElements().add(bundleComponent);
- Stereotype pluginStereotype=bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
- bundleComponent.applyStereotype(pluginStereotype);
- //add in the index of bundles
- createdBundleIndex.put(bundleDesignerRegistry.getSymbolicName(bundleProject), bundleComponent);
- fillRequiredBundle(bundleComponent, bundleProject, pluginPackage);
- bundleDesignerRegistry.fillPluginProperties(bundleComponent, bundleProject);
- bundleDesignerRegistry.fillExportedPackages(bundleComponent, bundleProject);
- }
+
+
+/**
+ * Model a bundle into the plugins packages:
+ * <UL>
+ * <LI> model the bundle as a stereotyped UML component
+ * <LI>add links to required bundle
+ * <LI> fill information about exported packages
+ * </UL>
+ *
+ *
+ * @param pluginPackage
+ * @param bundleProjectsIterator
+ */
+protected void modelBundle(Package pluginPackage, Object bundleProject) {
+
+ if(!createdBundleIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject))){
+ Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
+ System.out.println("-->"+bundleDesignerRegistry.getSymbolicName(bundleProject));
+ bundleComponent.setName(bundleDesignerRegistry.getSymbolicName(bundleProject));
+ pluginPackage.getPackagedElements().add(bundleComponent);
+ Stereotype pluginStereotype=bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
+ bundleComponent.applyStereotype(pluginStereotype);
+ //add in the index of bundles
+ createdBundleIndex.put(bundleDesignerRegistry.getSymbolicName(bundleProject), bundleComponent);
+ fillRequiredBundle(bundleComponent, bundleProject, pluginPackage);
+ bundleDesignerRegistry.fillPluginProperties(bundleComponent, bundleProject);
+ bundleDesignerRegistry.fillExportedPackages(bundleComponent, bundleProject);
}
+}
- /**
- * Ensure that the profile ADL4 eclipse has been applied
- */
- protected void initModel(){
- RegisteredProfile registeredProfile=RegisteredProfile.getRegisteredProfile("ADL4Eclipse");
- if(registeredProfile!=null){
- URI modelUri = registeredProfile.uri;
- final Resource modelResource = Util.getResourceSet(rootPackage).getResource(modelUri, true);
- Profile adl4eclipseprofile=(Profile) modelResource.getContents().get(0);
- PackageUtil.applyProfile(rootPackage, adl4eclipseprofile, false);
- }
+/**
+ * Ensure that the profile ADL4 eclipse has been applied
+ */
+protected void initModel(){
+ RegisteredProfile registeredProfile=RegisteredProfile.getRegisteredProfile("ADL4Eclipse");
+ if(registeredProfile!=null){
+ URI modelUri = registeredProfile.uri;
+ final Resource modelResource = Util.getResourceSet(rootPackage).getResource(modelUri, true);
+ Profile adl4eclipseprofile=(Profile) modelResource.getContents().get(0);
+ PackageUtil.applyProfile(rootPackage, adl4eclipseprofile, false);
}
+}
- protected Object getBundle(String name){
- if(bundlesIndex==null){
- bundlesIndex= new HashMap<String, Object>();
- //loaded bundle
- BundleContext context = Activator.getDefault().getBundleContext();
- org.osgi.framework.Bundle[] bundles = context.getBundles();
- for(int i = 0; i < bundles.length; i++) {
- bundlesIndex.put(bundleDesignerRegistry.getSymbolicName(bundles[i]), bundles[i]);
- }
- IProject[] project=ResourcesPlugin.getWorkspace().getRoot().getProjects();
- //bundle Workspace
- ServiceReference<?> ref = context.getServiceReference(IBundleProjectService.class.getName());
- IBundleProjectService BundleProjectservice = (IBundleProjectService)context.getService(ref);
- for(int i = 0; i < project.length; i++) {
- try {
- if((project[i].getNature(IBundleProjectDescription.PLUGIN_NATURE))!=null){
- IBundleProjectDescription bundleDescription=BundleProjectservice.getDescription(project[i]);
- bundlesIndex.put(bundleDesignerRegistry.getSymbolicName(bundleDescription), bundleDescription);
- }
- } catch (CoreException e) {
- e.printStackTrace();
+protected Object getBundle(String name){
+ if(bundlesIndex==null){
+ bundlesIndex= new HashMap<String, Object>();
+ //loaded bundle
+ BundleContext context = Activator.getDefault().getBundleContext();
+ org.osgi.framework.Bundle[] bundles = context.getBundles();
+ for(int i = 0; i < bundles.length; i++) {
+ bundlesIndex.put(bundleDesignerRegistry.getSymbolicName(bundles[i]), bundles[i]);
+ }
+ IProject[] project=ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ //bundle Workspace
+ ServiceReference<?> ref = context.getServiceReference(IBundleProjectService.class.getName());
+ IBundleProjectService BundleProjectservice = (IBundleProjectService)context.getService(ref);
+ for(int i = 0; i < project.length; i++) {
+ try {
+ if((project[i].getNature(IBundleProjectDescription.PLUGIN_NATURE))!=null){
+ IBundleProjectDescription bundleDescription=BundleProjectservice.getDescription(project[i]);
+ bundlesIndex.put(bundleDesignerRegistry.getSymbolicName(bundleDescription), bundleDescription);
}
+ } catch (CoreException e) {
+ e.printStackTrace();
}
-
}
- return bundlesIndex.get(name);
-
}
- /**
- * Model the required bundle. if it not exist the bundle is modeling.
- * It create a stereotyped dependency to the required element
- * @param bundleComponent the description of the bundle
- * @param bundleProject
- */
- protected void fillRequiredBundle(Component bundleComponent,Object bundleProject,Package library ) {
- ArrayList<ReferencedOSGIElement> requiredBundleNameList=bundleDesignerRegistry.getRequiredBundle(bundleComponent, bundleProject);
- Iterator<ReferencedOSGIElement> bundleNameIterator= requiredBundleNameList.iterator();
- while(bundleNameIterator.hasNext()) {
- dependenciesN++;
- ReferencedOSGIElement bundleRef = (ReferencedOSGIElement)bundleNameIterator.next();
- if(!(createdBundleIndex.containsKey(bundleRef.getSymbolicName()))){
- modelPlugin(library, getBundle(bundleRef.getSymbolicName()));
- }
- Component requiredComponent=createdBundleIndex.get(bundleRef.getSymbolicName());
- Dependency dependency=UMLFactory.eINSTANCE.createDependency();
- dependency.setName(requiredComponent.getName());
- bundleComponent.getPackagedElements().add(dependency);
- dependency.getClients().add(bundleComponent);
- dependency.getSuppliers().add(requiredComponent);
- Stereotype bRef_stereotype= dependency.getApplicableStereotype(IOSGIStereotype.BUNDLEREFERENCE_);
- dependency.applyStereotype(bRef_stereotype);
- VersionRange versionRange=bundleRef.getVersion();
- if( versionRange!=null){
- if( versionRange.getRight()==null){
- dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_ATLEAST_ATT, versionRange.getLeft().toString());
- System.out.println(" "+versionRange.getLeft());
- }
- else{
- dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_FLOOR_ATT, versionRange.getLeft().toString());
- dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_CEILING_ATT, versionRange.getRight().toString());
- dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_INCLUDEFLOOR_ATT, versionRange.getRightType()==VersionRange.LEFT_OPEN);
- dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_INCLUDECEILING_ATT, versionRange.getRightType()==VersionRange.RIGHT_OPEN);
- System.out.println(" "+versionRange.getRight()+" "+versionRange.getLeft());
- }
- }
+
+ return bundlesIndex.get(name);
+
+}
+/**
+ * Model the required bundle. if it not exist the bundle is modeling.
+ * It create a stereotyped dependency to the required element
+ * @param bundleComponent the description of the bundle
+ * @param bundleProject
+ */
+protected void fillRequiredBundle(Component bundleComponent,Object bundleProject,Package library ) {
+ ArrayList<ReferencedOSGIElement> requiredBundleNameList=bundleDesignerRegistry.getRequiredBundle(bundleComponent, bundleProject);
+ Iterator<ReferencedOSGIElement> bundleNameIterator= requiredBundleNameList.iterator();
+ while(bundleNameIterator.hasNext()) {
+ dependenciesN++;
+ ReferencedOSGIElement bundleRef = (ReferencedOSGIElement)bundleNameIterator.next();
+ if(!(createdBundleIndex.containsKey(bundleRef.getSymbolicName()))){
+ modelBundle(library, getBundle(bundleRef.getSymbolicName()));
+ }
+ Component requiredComponent=createdBundleIndex.get(bundleRef.getSymbolicName());
+ Dependency dependency=UMLFactory.eINSTANCE.createDependency();
+ dependency.setName(requiredComponent.getName());
+ bundleComponent.getPackagedElements().add(dependency);
+ dependency.getClients().add(bundleComponent);
+ dependency.getSuppliers().add(requiredComponent);
+ Stereotype bRef_stereotype= dependency.getApplicableStereotype(IOSGIStereotype.BUNDLEREFERENCE_);
+ dependency.applyStereotype(bRef_stereotype);
+ VersionRange versionRange=bundleRef.getVersion();
+ if( versionRange!=null){
+ if( versionRange.getRight()==null){
+ dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_ATLEAST_ATT, versionRange.getLeft().toString());
+ System.out.println(" "+versionRange.getLeft());
+ }
+ else{
+ dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_FLOOR_ATT, versionRange.getLeft().toString());
+ dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_CEILING_ATT, versionRange.getRight().toString());
+ dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_INCLUDEFLOOR_ATT, versionRange.getRightType()==VersionRange.LEFT_OPEN);
+ dependency.setValue(bRef_stereotype, IOSGIStereotype.VERSIONRANGE_INCLUDECEILING_ATT, versionRange.getRightType()==VersionRange.RIGHT_OPEN);
+ System.out.println(" "+versionRange.getRight()+" "+versionRange.getLeft());
+ }
}
}
+}
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteArchitectureSnapshotDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteArchitectureSnapshotDesigner.java
index 50e1788529f..1d9a0ee5f50 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteArchitectureSnapshotDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteArchitectureSnapshotDesigner.java
@@ -24,9 +24,6 @@ import org.eclipse.uml2.uml.Package;
public class CompleteArchitectureSnapshotDesigner extends ArchitectureSnapshotDesigner {
- public CompleteArchitectureSnapshotDesigner(Package rootPackage) {
- super(rootPackage);
- }
public CompleteArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object>bundleInitialList) {
super(rootPackage, bundleInitialList);
@@ -39,6 +36,6 @@ import org.eclipse.uml2.uml.Package;
@Override
public void runImportBundles() {
initModel();
- modelPlugins(rootPackage);
+ modelBundles(rootPackage);
}
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteFeatureArchitectureSnapshotDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteFeatureArchitectureSnapshotDesigner.java
new file mode 100644
index 00000000000..f5c413b5b11
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteFeatureArchitectureSnapshotDesigner.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * 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.designer;
+
+import java.util.ArrayList;
+
+import org.eclipse.papyrus.adl4eclipse.org.IADL4ECLIPSE_Stereotype;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * designer to construct the architecture of feature from the workspace and platform
+ *
+ */
+public class CompleteFeatureArchitectureSnapshotDesigner extends ArchitectureSnapshotDesigner {
+
+ public CompleteFeatureArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
+ super(rootPackage, bundleInitialList);
+ }
+ @Override
+ public void runImportBundles() {
+ initModel();
+ modelBundles(rootPackage);
+ }
+ /**
+ * Model a bundle into the plugins packages:
+ * <UL>
+ * <LI> model the bundle as a stereotyped UML component
+ * <LI>add links to required bundle
+ * <LI> fill information about exported packages
+ * </UL>
+ *
+ *
+ * @param pluginPackage
+ * @param bundleProjectsIterator
+ */
+ protected void modelBundle(Package pluginPackage, Object bundleProject) {
+
+ if(!createdBundleIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject))){
+ Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
+ System.out.println("-->"+bundleDesignerRegistry.getSymbolicName(bundleProject));
+ bundleComponent.setName(bundleDesignerRegistry.getSymbolicName(bundleProject));
+ pluginPackage.getPackagedElements().add(bundleComponent);
+ Stereotype pluginStereotype=bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.FEATURE_STEREOTYPE);
+ bundleComponent.applyStereotype(pluginStereotype);
+ //add in the index of bundles
+ createdBundleIndex.put(bundleDesignerRegistry.getSymbolicName(bundleProject), bundleComponent);
+ fillRequiredBundle(bundleComponent, bundleProject, pluginPackage);
+ //bundleDesignerRegistry.fillPluginProperties(bundleComponent, bundleProject);
+ //bundleDesignerRegistry.fillExportedPackages(bundleComponent, bundleProject);
+ }
+ }
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleArchitectureSnapshotDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleArchitectureSnapshotDesigner.java
index 9a9182d698d..e1b1eddf297 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleArchitectureSnapshotDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleArchitectureSnapshotDesigner.java
@@ -27,9 +27,8 @@ public class SimpleArchitectureSnapshotDesigner extends ArchitectureSnapshotDesi
protected Package architecture;
protected Package platform;
- public SimpleArchitectureSnapshotDesigner(Package rootPackage) {
- super(rootPackage);
- }
+ protected Package architecturefeature;
+ protected Package platformfeature;
public SimpleArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object>bundleInitialList) {
@@ -41,21 +40,23 @@ public class SimpleArchitectureSnapshotDesigner extends ArchitectureSnapshotDesi
super.initModel();
architecture=rootPackage.createNestedPackage("Architecture");
platform=rootPackage.createNestedPackage("Platform");
+
}
@Override
public void runImportBundles() {
initModel();
- modelPlugins(architecture);
+ modelBundles(architecture);
+
}
@Override
- protected void modelPlugin(Package pluginPackage, Object bundleProject) {
+ protected void modelBundle(Package pluginPackage, Object bundleProject) {
if (bundleProject instanceof Bundle){
- super.modelPlugin(platform, bundleProject);
+ super.modelBundle(platform, bundleProject);
}
else{
- super.modelPlugin(architecture, bundleProject);
+ super.modelBundle(architecture, bundleProject);
}
}
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleFeatureArchitectureSnapshotDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleFeatureArchitectureSnapshotDesigner.java
new file mode 100644
index 00000000000..1bedd942c28
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleFeatureArchitectureSnapshotDesigner.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * 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.designer;
+
+import java.util.ArrayList;
+
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Designer to construct the architecture of feature from the workspace.
+ *
+ */
+public class SimpleFeatureArchitectureSnapshotDesigner extends CompleteFeatureArchitectureSnapshotDesigner {
+
+
+ protected Package architecture;
+ protected Package platform;
+ protected Package architecturefeature;
+ protected Package platformfeature;
+
+ public SimpleFeatureArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
+ super(rootPackage, bundleInitialList);
+ }
+
+
+
+ @Override
+ protected void initModel() {
+ super.initModel();
+ architecture=rootPackage.createNestedPackage("Architecture");
+ platform=rootPackage.createNestedPackage("Platform");
+
+ }
+
+ @Override
+ public void runImportBundles() {
+ initModel();
+ modelBundles(architecture);
+
+ }
+
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleDesignerRegistry.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleDesignerRegistry.java
index dd90bb9d1d6..d82f53cc44c 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleDesignerRegistry.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleDesignerRegistry.java
@@ -16,6 +16,7 @@ package org.eclipse.papyrus.adltool.designer.bundle;
import java.util.ArrayList;
import org.eclipse.pde.core.project.IBundleProjectDescription;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
import org.eclipse.uml2.uml.Component;
import org.osgi.framework.Bundle;
@@ -27,11 +28,13 @@ import org.osgi.framework.Bundle;
public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
protected WorkspaceBundleDescriptionDesigner workspaceBundleDescriptionDesigner;
protected LoadedBundleDescriptionDesigner loadedBundleDescriptionDesigner;
+ protected FeatureDescriptionDesigner featureDescriptionDesigner;
public BundleDesignerRegistry() {
workspaceBundleDescriptionDesigner= new WorkspaceBundleDescriptionDesigner();
loadedBundleDescriptionDesigner= new LoadedBundleDescriptionDesigner();
+ featureDescriptionDesigner =new FeatureDescriptionDesigner();
}
/**
@@ -50,6 +53,9 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
else if(bundleProject instanceof Bundle){
return loadedBundleDescriptionDesigner.getBundleValue(bundleProject, key);
}
+ else if(bundleProject instanceof IFeatureModel){
+ return featureDescriptionDesigner.getBundleValue(bundleProject, key);
+ }
return null;
}
@@ -68,6 +74,9 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
else if(bundleProject instanceof Bundle){
loadedBundleDescriptionDesigner.fillPluginProperties(bundleComponent, bundleProject);
}
+ else if(bundleProject instanceof IFeatureModel){
+ featureDescriptionDesigner.fillPluginProperties(bundleComponent, bundleProject);
+ }
}
/**
@@ -85,6 +94,9 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
else if(bundleProject instanceof Bundle){
return loadedBundleDescriptionDesigner.getSymbolicName(bundleProject);
}
+ else if(bundleProject instanceof IFeatureModel){
+ return featureDescriptionDesigner.getSymbolicName(bundleProject);
+ }
return null;
}
@@ -103,6 +115,9 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
else if(bundleProject instanceof Bundle){
loadedBundleDescriptionDesigner.fillExportedPackages(bundleComponent, bundleProject);
}
+ else if(bundleProject instanceof IFeatureModel){
+ featureDescriptionDesigner.fillExportedPackages(bundleComponent, bundleProject);
+ }
}
/**
@@ -121,6 +136,9 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
else if(bundleProject instanceof Bundle){
return loadedBundleDescriptionDesigner.getRequiredBundle(bundleComponent, bundleProject);
}
+ else if(bundleProject instanceof IFeatureModel){
+ return featureDescriptionDesigner.getRequiredBundle(bundleComponent, bundleProject);
+ }
return new ArrayList<ReferencedOSGIElement>();
}
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleLabelProvider.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleLabelProvider.java
index a5d36452bce..4f39509bc1f 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleLabelProvider.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleLabelProvider.java
@@ -17,6 +17,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.pde.core.project.IBundleProjectDescription;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
@@ -37,6 +38,10 @@ public class BundleLabelProvider extends LabelProvider {
else if(bundleProject instanceof Bundle){
return getImage("img/bundle_obj.gif");
}
+ else if(bundleProject instanceof IFeatureModel){
+ return getImage("img/bundle_obj.gif");
+ }
+
return super.getImage(bundleProject);
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/FeatureDescriptionDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/FeatureDescriptionDesigner.java
new file mode 100644
index 00000000000..8ca8939fe4f
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/FeatureDescriptionDesigner.java
@@ -0,0 +1,33 @@
+package org.eclipse.papyrus.adltool.designer.bundle;
+
+import java.util.ArrayList;
+
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.uml2.uml.Component;
+
+
+public class FeatureDescriptionDesigner extends AbstractBundleDescriptionDesigner {
+
+ public String getSymbolicName(Object bundleProject) {
+ if(bundleProject instanceof IFeatureModel){
+ return ((IFeatureModel)bundleProject).getFeature().getId();
+ }
+ return null;
+ }
+
+ public void fillExportedPackages(Component bundleComponent, Object bundleProject) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ArrayList<ReferencedOSGIElement> getRequiredBundle(Component bundleComponent, Object bundleProject) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getBundleValue(Object bundleProject, String key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/LoadedBundleDescriptionDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/LoadedBundleDescriptionDesigner.java
index 09c2256c8d2..a0876921e9d 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/LoadedBundleDescriptionDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/LoadedBundleDescriptionDesigner.java
@@ -19,8 +19,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.osgi.util.ManifestElement;
import org.eclipse.papyrus.adl4eclipse.org.IADL4ECLIPSE_Stereotype;
import org.eclipse.papyrus.osgi.profile.IOSGIStereotype;
-import org.eclipse.pde.core.project.IBundleProjectDescription;
-import org.eclipse.pde.core.project.IPackageExportDescription;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Stereotype;
@@ -70,7 +68,7 @@ public class LoadedBundleDescriptionDesigner extends AbstractBundleDescriptionDe
UMLPackage.setName(manisfests[i].getValue());
bundleComponent.getPackagedElements().add(UMLPackage);
- Stereotype exportedPackageStereotype=UMLPackage.getApplicableStereotype(IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_);
+ Stereotype exportedPackageStereotype=UMLPackage.getApplicableStereotype(IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_STEREOTYPE);
UMLPackage.applyStereotype(exportedPackageStereotype);
if((manisfests[i].getDirective("x-internal"))!=null){
String booleanString=(manisfests[i].getDirective("x-internal"));
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/WorkspaceBundleDescriptionDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/WorkspaceBundleDescriptionDesigner.java
index fc592b963b1..8348e041a6e 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/WorkspaceBundleDescriptionDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/WorkspaceBundleDescriptionDesigner.java
@@ -89,7 +89,7 @@ public class WorkspaceBundleDescriptionDesigner extends AbstractBundleDescriptio
Package UMLPackage=UMLFactory.eINSTANCE.createPackage();
UMLPackage.setName(packageExportDescription[i].getName());
bundleComponent.getPackagedElements().add(UMLPackage);
- Stereotype exportedPackageStereotype=UMLPackage.getApplicableStereotype(IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_);
+ Stereotype exportedPackageStereotype=UMLPackage.getApplicableStereotype(IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_STEREOTYPE);
UMLPackage.applyStereotype(exportedPackageStereotype);
UMLPackage.setValue(exportedPackageStereotype, IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_ISINTERNAL_ATT, !packageExportDescription[i].isApi());
//TODO:friends
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/FeatureArchitectureWizard.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/FeatureArchitectureWizard.java
new file mode 100644
index 00000000000..1b6d01646a9
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/FeatureArchitectureWizard.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * 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.designer.wizard;
+
+import java.util.ArrayList;
+
+import org.eclipse.papyrus.adltool.designer.ArchitectureSnapshotDesigner;
+
+/**
+ * this wizard is used to display feature from workspace and the platform
+ *
+ */
+public class FeatureArchitectureWizard extends PluginArchitectureWizard {
+
+ public FeatureArchitectureWizard(boolean onlyWorkspace) {
+ super(onlyWorkspace);
+ }
+
+ @Override
+ public void addPages() {
+ ArrayList<Object> bundleList= new ArrayList<Object>();
+ if(onlyWorkspace){
+ bundleList.addAll(ArchitectureSnapshotDesigner.getWorkspaceFeature());
+ }
+ else{
+ bundleList.addAll(ArchitectureSnapshotDesigner.getFeature());
+ }
+ bundleSelectionPage = new BundleSelectionPage(bundleList);
+ addPage(bundleSelectionPage);
+ }
+
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleArchitectureWizard.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java
index 0582ae0048e..0e31f5dde22 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleArchitectureWizard.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java
@@ -20,14 +20,17 @@ import java.util.ArrayList;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.papyrus.adltool.designer.ArchitectureSnapshotDesigner;
+/**
+ * this wizard is used to display plugin from workspace and the platform
+ *
+ */
-
-public class BundleArchitectureWizard extends Wizard {
+public class PluginArchitectureWizard extends Wizard {
protected BundleSelectionPage bundleSelectionPage;
protected boolean onlyWorkspace=true;
- public BundleArchitectureWizard(boolean onlyWorkspace) {
+ public PluginArchitectureWizard(boolean onlyWorkspace) {
super();
setNeedsProgressMonitor(true);
this.onlyWorkspace=onlyWorkspace;

Back to the top