Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-08-21 11:37:18 +0000
committerCamille Letavernier2014-08-21 11:37:18 +0000
commitea48a20561464c3cbb7895d430583669a9f82fcc (patch)
tree0fdf9eebacbbb301b13bafce3ca4a6952ff6e91c /extraplugins/adl4eclipse
parentf91b71175fd97557cf378cdcad845a44a6274b16 (diff)
downloadorg.eclipse.papyrus-ea48a20561464c3cbb7895d430583669a9f82fcc.tar.gz
org.eclipse.papyrus-ea48a20561464c3cbb7895d430583669a9f82fcc.tar.xz
org.eclipse.papyrus-ea48a20561464c3cbb7895d430583669a9f82fcc.zip
[Code style] Apply clean-up and formatter on Extra plug-ins
Diffstat (limited to 'extraplugins/adl4eclipse')
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/Activator.java10
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/IADL4ECLIPSE_Stereotype.java72
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/AdvancePluginImport.java56
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimpleFeatureImport.java26
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimplePluginImport.java61
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ADLToolAbstractHandler.java77
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/Activator.java14
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompleteFeatureArchitectureHandler.java27
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java27
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelFeatureArchitectureFromWorkspaceHandler.java27
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java23
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/Activator.java16
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompleteFeaturesArchitectureSnapshotCommand.java29
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java27
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimpleFeaturesArchitectureSnapshotCommand.java31
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java29
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/ArchitectureSnapshotDesigner.java468
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteArchitectureSnapshotDesigner.java17
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/CompleteFeatureArchitectureSnapshotDesigner.java7
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleArchitectureSnapshotDesigner.java24
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/SimpleFeatureArchitectureSnapshotDesigner.java30
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/AbstractBundleDescriptionDesigner.java203
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleDesignerRegistry.java109
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/BundleLabelProvider.java35
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/FeatureDescriptionDesigner.java42
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/IBundleDescriptionDesigner.java33
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/LoadedBundleDescriptionDesigner.java85
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/ReferencedOSGIElement.java34
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/WorkspaceBundleDescriptionDesigner.java85
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java56
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/FeatureArchitectureWizard.java14
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java31
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/Activator.java10
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/IOSGIStereotype.java170
34 files changed, 1057 insertions, 948 deletions
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/Activator.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/Activator.java
index 30678fe13b1..bb8aa6884fd 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/Activator.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/Activator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -21,12 +21,12 @@ import org.osgi.framework.BundleContext;
*/
public class Activator extends AbstractUIPlugin {
- /** The plug-in ID**/
+ /** The plug-in ID **/
public static final String PLUGIN_ID = "org.eclipse.papyrus.adl4eclipse.org"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -35,8 +35,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -44,8 +46,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/IADL4ECLIPSE_Stereotype.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/IADL4ECLIPSE_Stereotype.java
index db4e40ed21a..08c4ec58170 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/IADL4ECLIPSE_Stereotype.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipse.profile/src/org/eclipse/papyrus/adl4eclipse/org/IADL4ECLIPSE_Stereotype.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -13,80 +13,80 @@
*****************************************************************************/
package org.eclipse.papyrus.adl4eclipse.org;
-/** set of constant to manipulate stereotype**/
+/** set of constant to manipulate stereotype **/
public interface IADL4ECLIPSE_Stereotype {
/** Qualified name of the stereotype Plugin */
public static final String PLUGIN_STEREOTYPE = "ADL4Eclipse::Plugin";
- /** name of property isIncubation of the stereoype Plugin */
+ /** name of property isIncubation of the stereoype Plugin */
public static final String PLUGIN_ISINCUBATION_ATT = "isIncubation";
- /** name of property lazyStart of the stereoype Plugin */
+ /** name of property lazyStart of the stereoype Plugin */
public static final String PLUGIN_LAZYSTART_ATT = "lazyStart";
- /** name of property lazyStartException of the stereoype Plugin */
+ /** name of property lazyStartException of the stereoype Plugin */
public static final String PLUGIN_LAZYSTARTEXCEPTION_ATT = "lazyStartException";
- /** name of property platformFilter of the stereoype Plugin */
+ /** name of property platformFilter of the stereoype Plugin */
public static final String PLUGIN_PLATFORMFILTER_ATT = "platformFilter";
- /** name of property buddyPolicy of the stereoype Plugin */
+ /** name of property buddyPolicy of the stereoype Plugin */
public static final String PLUGIN_BUDDYPOLICY_ATT = "buddyPolicy";
- /** name of property extensibleAPI of the stereoype Plugin */
+ /** name of property extensibleAPI of the stereoype Plugin */
public static final String PLUGIN_EXTENSIBLEAPI_ATT = "extensibleAPI";
- /** name of property bundleShape of the stereoype Plugin */
+ /** name of property bundleShape of the stereoype Plugin */
public static final String PLUGIN_BUNDLESHAPE_ATT = "bundleShape";
- /** name of property capability of the stereoype Plugin */
+ /** name of property capability of the stereoype Plugin */
public static final String PLUGIN_CAPABILITY_ATT = "capability";
- /** name of property requireCapability of the stereoype Plugin */
+ /** name of property requireCapability of the stereoype Plugin */
public static final String PLUGIN_REQUIRECAPABILITY_ATT = "requireCapability";
- /** name of property genericCapabilityAlias of the stereoype Plugin */
+ /** name of property genericCapabilityAlias of the stereoype Plugin */
public static final String PLUGIN_GENERICCAPABILITYALIAS_ATT = "genericCapabilityAlias";
/** Qualified name of the stereotype EclipseExportedPackage */
public static final String ECLIPSEEXPORTEDPACKAGE_STEREOTYPE = "ADL4Eclipse::EclipseExportedPackage";
- /** name of property isInternal of the stereoype EclipseExportedPackage */
+ /** name of property isInternal of the stereoype EclipseExportedPackage */
public static final String ECLIPSEEXPORTEDPACKAGE_ISINTERNAL_ATT = "isInternal";
- /** name of property friend of the stereoype EclipseExportedPackage */
+ /** name of property friend of the stereoype EclipseExportedPackage */
public static final String ECLIPSEEXPORTEDPACKAGE_FRIEND_ATT = "friend";
- /** name of literal dependent of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal dependent of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_DEPENDENT_ENUM = "dependent";
- /** name of literal global of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal global of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_GLOBAL_ENUM = "global";
- /** name of literal registered of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal registered of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_REGISTERED_ENUM = "registered";
- /** name of literal app of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal app of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_APP_ENUM = "app";
- /** name of literal ext of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal ext of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_EXT_ENUM = "ext";
- /** name of literal boot of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal boot of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_BOOT_ENUM = "boot";
- /** name of literal parent of the Enumeration BuddyPolicyEnumeration */
+ /** name of literal parent of the Enumeration BuddyPolicyEnumeration */
public static final String BUDDYPOLICYENUMERATION_PARENT_ENUM = "parent";
- /** name of literal jar of the Enumeration BundleShapeEnumeration */
+ /** name of literal jar of the Enumeration BundleShapeEnumeration */
public static final String BUNDLESHAPEENUMERATION_JAR_ENUM = "jar";
- /** name of literal dir of the Enumeration BundleShapeEnumeration */
+ /** name of literal dir of the Enumeration BundleShapeEnumeration */
public static final String BUNDLESHAPEENUMERATION_DIR_ENUM = "dir";
/** Qualified name of the stereotype Feature */
public static final String FEATURE_STEREOTYPE = "ADL4Eclipse::Feature";
- /** name of property base_Class of the stereoype Feature */
+ /** name of property base_Class of the stereoype Feature */
public static final String FEATURE_BASE_CLASS_ATT = "base_Class";
- /** name of property description of the stereoype Feature */
+ /** name of property description of the stereoype Feature */
public static final String FEATURE_DESCRIPTION_ATT = "description";
- /** name of property copyright of the stereoype Feature */
+ /** name of property copyright of the stereoype Feature */
public static final String FEATURE_COPYRIGHT_ATT = "copyright";
- /** name of property license of the stereoype Feature */
+ /** name of property license of the stereoype Feature */
public static final String FEATURE_LICENSE_ATT = "license";
- /** name of property provider of the stereoype Feature */
+ /** name of property provider of the stereoype Feature */
public static final String FEATURE_PROVIDER_ATT = "provider";
- /** name of property image of the stereoype Feature */
+ /** name of property image of the stereoype Feature */
public static final String FEATURE_IMAGE_ATT = "image";
- /** name of property url of the stereoype Feature */
+ /** name of property url of the stereoype Feature */
public static final String FEATURE_URL_ATT = "url";
- /** name of property plugins of the stereoype Feature */
+ /** name of property plugins of the stereoype Feature */
public static final String FEATURE_PLUGINS_ATT = "plugins";
- /** name of property includedFeatures of the stereoype Feature */
+ /** name of property includedFeatures of the stereoype Feature */
public static final String FEATURE_INCLUDEDFEATURES_ATT = "includedFeatures";
- /** name of property importedFeatures of the stereoype Feature */
+ /** name of property importedFeatures of the stereoype Feature */
public static final String FEATURE_IMPORTEDFEATURES_ATT = "importedFeatures";
- /** name of property label of the stereoype Feature */
+ /** name of property label of the stereoype Feature */
public static final String FEATURE_LABEL_ATT = "label";
- /** name of property id of the stereoype Feature */
+ /** name of property id of the stereoype Feature */
public static final String FEATURE_ID_ATT = "id";
- /** name of property version of the stereoype Feature */
+ /** name of property version of the stereoype Feature */
public static final String FEATURE_VERSION_ATT = "version";
}
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 283c0019c30..8804ff386ad 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -16,16 +16,12 @@ package org.eclipse.papyrus.adl4eclipsetool.assistant;
import java.util.ArrayList;
import java.util.Iterator;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.papyrus.adltool.command.CompletePluginsArchitectureSnapshotCommand;
-import org.eclipse.papyrus.adltool.command.SimplePluginsArchitectureSnapshotCommand;
import org.eclipse.papyrus.adltool.designer.ArchitectureSnapshotDesigner;
import org.eclipse.papyrus.adltool.designer.wizard.BundleSelectionPage;
import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
@@ -48,12 +44,12 @@ import org.eclipse.uml2.uml.Package;
public class AdvancePluginImport extends Wizard implements IImportWizard {
protected BundleSelectionPage bundleSelectionPage;
- protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected TransactionalEditingDomain transactionalEditingDomain = null;
protected PapyrusMultiDiagramEditor papyrusEditor;
protected ModelSet modelSet;
/**
- *
+ *
* Constructor.
*
*/
@@ -64,32 +60,33 @@ public class AdvancePluginImport extends Wizard implements IImportWizard {
@Override
public void addPages() {
- //look for all plugins from the workspace
- ArrayList<Object> bundleList= new ArrayList<Object>();
+ // look for all plugins from the workspace
+ ArrayList<Object> bundleList = new ArrayList<Object>();
bundleList.addAll(ArchitectureSnapshotDesigner.getLoadedBundles());
bundleSelectionPage = new BundleSelectionPage(bundleList);
addPage(bundleSelectionPage);
}
/**
- *
+ *
* @return the list of selected bundle from the page
*/
- public ArrayList<Object> getSelectedBundle(){
+ public ArrayList<Object> getSelectedBundle() {
return bundleSelectionPage.getResult();
}
+
@Override
public boolean performFinish() {
-
+
// one bundle must be selected
- if(getSelectedBundle().size()>0){
+ if (getSelectedBundle().size() > 0) {
// get the domain in order to launche the command
TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
- ArrayList<Element> selection=getSelectionSet();
-
- if( (selection.size()==1) &&(selection.get(0)instanceof Package)){
- //launch the simple retro engineering
- CompletePluginsArchitectureSnapshotCommand comd= new CompletePluginsArchitectureSnapshotCommand(dom, (Package)selection.get(0), getSelectedBundle());
+ ArrayList<Element> selection = getSelectionSet();
+
+ if ((selection.size() == 1) && (selection.get(0) instanceof Package)) {
+ // launch the simple retro engineering
+ CompletePluginsArchitectureSnapshotCommand comd = new CompletePluginsArchitectureSnapshotCommand(dom, (Package) selection.get(0), getSelectedBundle());
dom.getCommandStack().execute(comd);
}
return true;
@@ -98,9 +95,9 @@ public class AdvancePluginImport extends Wizard implements IImportWizard {
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
-
- //get the service registry of papyrus from the selection
- ServicesRegistry registry=null;
+
+ // get the service registry of papyrus from the selection
+ ServicesRegistry registry = null;
try {
registry = ServiceUtilsForSelection.getInstance().getServiceRegistry(selection);
} catch (ServiceException e1) {
@@ -111,27 +108,28 @@ public class AdvancePluginImport extends Wizard implements IImportWizard {
} catch (ServiceException e) {
e.printStackTrace();
}
-
+
}
-
+
/**
* getSelected element in the diagram or in the model explorer
+ *
* @return Element or null
*/
- protected ArrayList<Element> getSelectionSet(){
- ArrayList<Element> selectedSet =new ArrayList<Element>();
+ protected ArrayList<Element> getSelectionSet() {
+ ArrayList<Element> selectedSet = new ArrayList<Element>();
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- if(selection instanceof IStructuredSelection) {
+ if (selection instanceof IStructuredSelection) {
@SuppressWarnings("rawtypes")
- Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
+ Iterator selectedobjectIteractor = ((IStructuredSelection) selection).iterator();
while (selectedobjectIteractor.hasNext()) {
Object currentSelection = selectedobjectIteractor.next();
EObject selectedEObject = EMFHelper.getEObject(currentSelection);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedSet.add((Element)selectedEObject);
+ 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/SimpleFeatureImport.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimpleFeatureImport.java
index f1115cd0926..174dd963ff3 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimpleFeatureImport.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adl4eclipsetool/assistant/SimpleFeatureImport.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -26,29 +26,29 @@ import org.eclipse.uml2.uml.Package;
* this class is used to do the retro engineering from workspace plug-in. It adds only in the platform dependencies.
*
*/
-public class SimpleFeatureImport extends SimplePluginImport{
+public class SimpleFeatureImport extends SimplePluginImport {
@Override
public void addPages() {
- //look for all plug-ins from the workspace
- ArrayList<Object> bundleList= new ArrayList<Object>();
+ // look for all plug-ins from the workspace
+ ArrayList<Object> bundleList = new ArrayList<Object>();
bundleList.addAll(ArchitectureSnapshotDesigner.getWorkspaceFeature());
bundleSelectionPage = new BundleSelectionPage(bundleList);
addPage(bundleSelectionPage);
}
-
-
+
+
@Override
public boolean performFinish() {
-
+
// one bundle must be selected
- if(getSelectedBundle().size()>0){
+ if (getSelectedBundle().size() > 0) {
// get the domain in order to launch the command
TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
- ArrayList<Element> selection=getSelectionSet();
-
- if( (selection.size()==1) &&(selection.get(0)instanceof Package)){
- //launch the simple retro engineering
- SimpleFeaturesArchitectureSnapshotCommand comd= new SimpleFeaturesArchitectureSnapshotCommand(dom, (Package)selection.get(0), getSelectedBundle());
+ ArrayList<Element> selection = getSelectionSet();
+
+ if ((selection.size() == 1) && (selection.get(0) instanceof Package)) {
+ // launch the simple retro engineering
+ SimpleFeaturesArchitectureSnapshotCommand comd = new SimpleFeaturesArchitectureSnapshotCommand(dom, (Package) selection.get(0), getSelectedBundle());
dom.getCommandStack().execute(comd);
}
return true;
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 32aa67b058e..94e3fc14c28 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -16,11 +16,8 @@ package org.eclipse.papyrus.adl4eclipsetool.assistant;
import java.util.ArrayList;
import java.util.Iterator;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
@@ -47,12 +44,12 @@ import org.eclipse.uml2.uml.Package;
public class SimplePluginImport extends Wizard implements IImportWizard {
protected BundleSelectionPage bundleSelectionPage;
- protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected TransactionalEditingDomain transactionalEditingDomain = null;
protected PapyrusMultiDiagramEditor papyrusEditor;
protected ModelSet modelSet;
/**
- *
+ *
* Constructor.
*
*/
@@ -63,32 +60,33 @@ public class SimplePluginImport extends Wizard implements IImportWizard {
@Override
public void addPages() {
- //look for all plugins from the workspace
- ArrayList<Object> bundleList= new ArrayList<Object>();
+ // look for all plugins from the workspace
+ ArrayList<Object> bundleList = new ArrayList<Object>();
bundleList.addAll(ArchitectureSnapshotDesigner.getWorkspaceBundle());
bundleSelectionPage = new BundleSelectionPage(bundleList);
addPage(bundleSelectionPage);
}
/**
- *
+ *
* @return the list of selected bundle from the page
*/
- public ArrayList<Object> getSelectedBundle(){
+ public ArrayList<Object> getSelectedBundle() {
return bundleSelectionPage.getResult();
}
+
@Override
public boolean performFinish() {
-
+
// one bundle must be selected
- if(getSelectedBundle().size()>0){
+ if (getSelectedBundle().size() > 0) {
// get the domain in order to launche the command
TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
- ArrayList<Element> selection=getSelectionSet();
-
- if( (selection.size()==1) &&(selection.get(0)instanceof Package)){
- //launch the simple retro engineering
- SimplePluginsArchitectureSnapshotCommand comd= new SimplePluginsArchitectureSnapshotCommand(dom, (Package)selection.get(0),getSelectedBundle());
+ ArrayList<Element> selection = getSelectionSet();
+
+ if ((selection.size() == 1) && (selection.get(0) instanceof Package)) {
+ // launch the simple retro engineering
+ SimplePluginsArchitectureSnapshotCommand comd = new SimplePluginsArchitectureSnapshotCommand(dom, (Package) selection.get(0), getSelectedBundle());
dom.getCommandStack().execute(comd);
}
return true;
@@ -97,9 +95,9 @@ public class SimplePluginImport extends Wizard implements IImportWizard {
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
-
- //get the service registry of papyrus from the selection
- ServicesRegistry registry=null;
+
+ // get the service registry of papyrus from the selection
+ ServicesRegistry registry = null;
try {
registry = ServiceUtilsForSelection.getInstance().getServiceRegistry(selection);
} catch (ServiceException e1) {
@@ -110,31 +108,32 @@ public class SimplePluginImport extends Wizard implements IImportWizard {
} catch (ServiceException e) {
e.printStackTrace();
}
-
+
}
-
+
/**
* getSelected element in the diagram or in the model explorer
+ *
* @return Element or null
*/
- protected ArrayList<Element> getSelectionSet(){
- ArrayList<Element> selectedSet =new ArrayList<Element>();
+ protected ArrayList<Element> getSelectionSet() {
+ ArrayList<Element> selectedSet = new ArrayList<Element>();
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- if(selection instanceof IStructuredSelection) {
+ if (selection instanceof IStructuredSelection) {
@SuppressWarnings("rawtypes")
- Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
+ Iterator selectedobjectIteractor = ((IStructuredSelection) selection).iterator();
while (selectedobjectIteractor.hasNext()) {
Object currentSelection = selectedobjectIteractor.next();
-
- EObject selectedEObject = EMFHelper.getEObject(currentSelection);
- 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);
}
}
+ }
return selectedSet;
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ADLToolAbstractHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ADLToolAbstractHandler.java
index 5531c00d970..e30b261fc09 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ADLToolAbstractHandler.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ADLToolAbstractHandler.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -37,38 +37,39 @@ import org.eclipse.uml2.uml.Element;
*/
public abstract class ADLToolAbstractHandler extends AbstractHandler {
- protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected TransactionalEditingDomain transactionalEditingDomain = null;
protected PapyrusMultiDiagramEditor papyrusEditor;
/**
* getSelected element in the diagram or in hte model explorer
+ *
* @return Element or null
*/
- protected Element getSelection(){
- org.eclipse.uml2.uml.Element selectedElement =null;
+ protected Element getSelection() {
+ org.eclipse.uml2.uml.Element selectedElement = null;
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- //look for papyrus
- int i=0;
- while(!(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof IMultiDiagramEditor)&&i<100000) {
+ // look for papyrus
+ int i = 0;
+ while (!(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof IMultiDiagramEditor) && i < 100000) {
i++;
}
- if((PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()instanceof IMultiDiagramEditor)){
+ if ((PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof IMultiDiagramEditor)) {
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- papyrusEditor = ((PapyrusMultiDiagramEditor)editorPart);
+ papyrusEditor = ((PapyrusMultiDiagramEditor) editorPart);
- if(selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection)selection).getFirstElement();
- if(selectedobject instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)selectedobject).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedElement = (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement();
+ if (selection instanceof IStructuredSelection) {
+ Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedobject instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart) selectedobject).getModel();
+ if ((graphicalElement instanceof View) && ((View) graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (org.eclipse.uml2.uml.Element) ((View) graphicalElement).getElement();
}
}
- else if(selectedobject instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)selectedobject).getAdapter(EObject.class);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedElement=(Element)selectedEObject;
+ else if (selectedobject instanceof IAdaptable) {
+ EObject selectedEObject = (EObject) ((IAdaptable) selectedobject).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (Element) selectedEObject;
}
}
@@ -77,43 +78,45 @@ public abstract class ADLToolAbstractHandler extends AbstractHandler {
}
return null;
}
+
/**
* getSelected element in the diagram or in hte model explorer
+ *
* @return Element or null
*/
- protected ArrayList<Element> getSelectionSet(){
- ArrayList<Element> selectedSet =new ArrayList<Element>();
+ protected ArrayList<Element> getSelectionSet() {
+ ArrayList<Element> selectedSet = new ArrayList<Element>();
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- //look for papyrus
- int i=0;
- while(!(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof IMultiDiagramEditor)&&i<100000) {
+ // look for papyrus
+ int i = 0;
+ while (!(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof IMultiDiagramEditor) && i < 100000) {
i++;
}
- if((PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()instanceof IMultiDiagramEditor)){
+ if ((PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof IMultiDiagramEditor)) {
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- papyrusEditor = ((PapyrusMultiDiagramEditor)editorPart);
+ papyrusEditor = ((PapyrusMultiDiagramEditor) editorPart);
- if(selection instanceof IStructuredSelection) {
+ if (selection instanceof IStructuredSelection) {
@SuppressWarnings("rawtypes")
- Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
+ 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());
+ 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);
+ 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);
}
}
}
-
+
}
return selectedSet;
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/Activator.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/Activator.java
index 24150f65ff0..1bf1ec54451 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/Activator.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/Activator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -20,14 +20,14 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
-public class Activator extends AbstractUIPlugin implements IStartup{
+public class Activator extends AbstractUIPlugin implements IStartup {
- /** The plug-in ID**/
+ /** The plug-in ID **/
public static final String PLUGIN_ID = "org.eclipse.papyrus.adl4eclipsetool.assistant"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -36,8 +36,10 @@ public class Activator extends AbstractUIPlugin implements IStartup{
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -45,8 +47,10 @@ public class Activator extends AbstractUIPlugin implements IStartup{
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
@@ -63,7 +67,7 @@ public class Activator extends AbstractUIPlugin implements IStartup{
public void earlyStartup() {
// TODO Auto-generated method stub
-
+
}
}
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
index 064a5aeee91..e846e754872 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -31,12 +31,14 @@ import org.eclipse.uml2.uml.Package;
/**
* this handler is used to generate the feature and plugin architecture from workspace
- *@deprecated
+ *
+ * @deprecated
*/
+@Deprecated
public class ModelCompleteFeatureArchitectureHandler extends ADLToolAbstractHandler {
/**
- *
+ *
* Constructor.
*
*/
@@ -44,8 +46,8 @@ public class ModelCompleteFeatureArchitectureHandler extends ADLToolAbstractHand
}
public Object execute(ExecutionEvent event) throws ExecutionException {
- Element selectedElement=getSelection();
- ServicesRegistry registry=null;
+ Element selectedElement = getSelection();
+ ServicesRegistry registry = null;
try {
registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
} catch (ServiceException e1) {
@@ -57,21 +59,22 @@ public class ModelCompleteFeatureArchitectureHandler extends ADLToolAbstractHand
} catch (ServiceException e) {
throw new ExecutionException("Can't get ModelSet", e);
}
- FeatureArchitectureWizard bWizard=new FeatureArchitectureWizard(false);
- WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
+ 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());
+ if (selectedElement instanceof Package) {
+ CompleteFeaturesArchitectureSnapshotCommand comd = new CompleteFeaturesArchitectureSnapshotCommand(dom, (Package) selectedElement, bWizard.getSelectedBundle());
dom.getCommandStack().execute(comd);
}
- }
+ }
+
-
return null;
}
+
/**
- *
+ *
* {@inheritDoc}
*/
@Override
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java
index ad7dd71c1d8..c6bc608caff 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelCompletePluginArchitectureHandler.java
@@ -1,8 +1,7 @@
-
/*****************************************************************************
* 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
@@ -30,13 +29,14 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
/**
- *@deprecated
+ * @deprecated
*
*/
+@Deprecated
public class ModelCompletePluginArchitectureHandler extends ADLToolAbstractHandler {
/**
- *
+ *
* Constructor.
*
*/
@@ -44,8 +44,8 @@ public class ModelCompletePluginArchitectureHandler extends ADLToolAbstractHandl
}
public Object execute(ExecutionEvent event) throws ExecutionException {
- Element selectedElement=getSelection();
- ServicesRegistry registry=null;
+ Element selectedElement = getSelection();
+ ServicesRegistry registry = null;
try {
registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
} catch (ServiceException e1) {
@@ -57,21 +57,22 @@ public class ModelCompletePluginArchitectureHandler extends ADLToolAbstractHandl
} catch (ServiceException e) {
throw new ExecutionException("Can't get ModelSet", e);
}
- PluginArchitectureWizard bWizard=new PluginArchitectureWizard(false);
- WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
+ 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){
- CompletePluginsArchitectureSnapshotCommand comd= new CompletePluginsArchitectureSnapshotCommand(dom, (Package)selectedElement,bWizard.getSelectedBundle());
+ if (selectedElement instanceof Package) {
+ CompletePluginsArchitectureSnapshotCommand comd = new CompletePluginsArchitectureSnapshotCommand(dom, (Package) selectedElement, bWizard.getSelectedBundle());
dom.getCommandStack().execute(comd);
}
- }
+ }
return null;
}
+
/**
- *
- *{@inheritDoc}
+ *
+ * {@inheritDoc}
*/
@Override
public boolean isEnabled() {
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
index ca1a5bd7084..2d3eb49ed0f 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -31,12 +31,14 @@ import org.eclipse.uml2.uml.Package;
/**
* this handler is used to generate the feature and plugin architecture from workspace
- *@deprecated
+ *
+ * @deprecated
*/
+@Deprecated
public class ModelFeatureArchitectureFromWorkspaceHandler extends ADLToolAbstractHandler {
-
+
/**
- *
+ *
* Constructor.
*
*/
@@ -44,8 +46,8 @@ public class ModelFeatureArchitectureFromWorkspaceHandler extends ADLToolAbstrac
}
public Object execute(ExecutionEvent event) throws ExecutionException {
- Element selectedElement=getSelection();
- ServicesRegistry registry=null;
+ Element selectedElement = getSelection();
+ ServicesRegistry registry = null;
try {
registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
} catch (ServiceException e1) {
@@ -57,19 +59,20 @@ public class ModelFeatureArchitectureFromWorkspaceHandler extends ADLToolAbstrac
} catch (ServiceException e) {
throw new ExecutionException("Can't get ModelSet", e);
}
- FeatureArchitectureWizard bWizard=new FeatureArchitectureWizard(true);
- WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
+ 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());
+ if (selectedElement instanceof Package) {
+ SimpleFeaturesArchitectureSnapshotCommand comd = new SimpleFeaturesArchitectureSnapshotCommand(dom, (Package) selectedElement, bWizard.getSelectedBundle());
dom.getCommandStack().execute(comd);
}
- }
+ }
+
-
return null;
}
+
/**
* {@inheritDoc}
*/
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java
index 12a400d75c3..b6ebb6fa6ad 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool.assistant/src/org/eclipse/papyrus/adltool/assistant/ModelPluginArchitectureFromWorkspaceHandler.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -31,11 +31,13 @@ import org.eclipse.uml2.uml.Package;
/**
* this handler is used to generate the architecture from workspace
- *@deprecated
+ *
+ * @deprecated
*/
+@Deprecated
public class ModelPluginArchitectureFromWorkspaceHandler extends ADLToolAbstractHandler {
/**
- *
+ *
* Constructor.
*
*/
@@ -43,8 +45,8 @@ public class ModelPluginArchitectureFromWorkspaceHandler extends ADLToolAbstract
}
public Object execute(ExecutionEvent event) throws ExecutionException {
- Element selectedElement=getSelection();
- ServicesRegistry registry=null;
+ Element selectedElement = getSelection();
+ ServicesRegistry registry = null;
try {
registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
} catch (ServiceException e1) {
@@ -56,19 +58,20 @@ public class ModelPluginArchitectureFromWorkspaceHandler extends ADLToolAbstract
} catch (ServiceException e) {
throw new ExecutionException("Can't get ModelSet", e);
}
- PluginArchitectureWizard bWizard=new PluginArchitectureWizard(true);
- WizardDialog wizardDialog = new WizardDialog(new Shell(),bWizard);
+ 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){
- SimplePluginsArchitectureSnapshotCommand comd= new SimplePluginsArchitectureSnapshotCommand(dom, (Package)selectedElement, bWizard.getSelectedBundle());
+ if (selectedElement instanceof Package) {
+ SimplePluginsArchitectureSnapshotCommand comd = new SimplePluginsArchitectureSnapshotCommand(dom, (Package) selectedElement, bWizard.getSelectedBundle());
dom.getCommandStack().execute(comd);
}
- }
+ }
return null;
}
+
/**
* {@inheritDoc}
*/
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/Activator.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/Activator.java
index bdec1845685..99340c1f76a 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/Activator.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/Activator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -21,20 +21,20 @@ import org.osgi.framework.BundleContext;
*/
public class Activator extends AbstractUIPlugin {
- /** The plug-in ID**/
+ /** The plug-in ID **/
public static final String PLUGIN_ID = "org.eclipse.papyrus.adl4eclipsetool"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
private BundleContext bundleContext;
-
+
/**
* The constructor
*/
public Activator() {
}
-
+
/**
* @return the bundleContext
*/
@@ -44,19 +44,23 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- this.bundleContext=context;
-
+ this.bundleContext = context;
+
}
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
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
index ab8eb2f0697..3b86a84a261 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -28,29 +28,32 @@ import org.eclipse.uml2.uml.Package;
public class CompleteFeaturesArchitectureSnapshotCommand extends RecordingCommand {
protected Package rootPackage;
- protected ArrayList<Object> bundleList=null;
+ protected ArrayList<Object> bundleList = null;
/**
- *
+ *
* Constructor.
*
- * @param domain the domain mandatory to launch the command
- * @param rootPackage the root package in which the sub-packages will be created
- * @param bundleList the list of bundle for the retro engineering
+ * @param domain
+ * the domain mandatory to launch the command
+ * @param rootPackage
+ * the root package in which the sub-packages will be created
+ * @param bundleList
+ * the list of bundle for the retro engineering
*/
- 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;
+ 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);
+ CompleteFeatureArchitectureSnapshotDesigner snapshotDesigner = new CompleteFeatureArchitectureSnapshotDesigner(rootPackage, bundleList);
snapshotDesigner.runImportBundles();
}
-
+
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java
index 895e6bd4470..8d43e5bb630 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/CompletePluginsArchitectureSnapshotCommand.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -26,28 +26,31 @@ import org.eclipse.uml2.uml.Package;
*
*/
public class CompletePluginsArchitectureSnapshotCommand extends RecordingCommand {
- protected ArrayList<Object> bundleList=null;
+ protected ArrayList<Object> bundleList = null;
protected Package rootPackage;
/**
- *
+ *
* Constructor.
*
- * @param domain the domain mandatory to launch the command
- * @param rootPackage the root package in which the sub-packages will be created
- * @param bundleList the list of bundle for the retro engineering
+ * @param domain
+ * the domain mandatory to launch the command
+ * @param rootPackage
+ * the root package in which the sub-packages will be created
+ * @param bundleList
+ * the list of bundle for the retro engineering
*/
- public CompletePluginsArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
- super(domain,"Import Bundles", "Model architecture from current workspace");
- this.rootPackage=rootPackage;
- this.bundleList=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;
}
-
+
@Override
protected void doExecute() {
- CompleteArchitectureSnapshotDesigner snapshotDesigner= new CompleteArchitectureSnapshotDesigner(rootPackage, bundleList);
+ CompleteArchitectureSnapshotDesigner snapshotDesigner = new CompleteArchitectureSnapshotDesigner(rootPackage, bundleList);
snapshotDesigner.runImportBundles();
}
}
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
index 2597fbe86c8..623a7c31080 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -28,30 +28,33 @@ import org.eclipse.uml2.uml.Package;
public class SimpleFeaturesArchitectureSnapshotCommand extends RecordingCommand {
protected Package rootPackage;
- protected ArrayList<Object> bundleList=null;
-
-
+ protected ArrayList<Object> bundleList = null;
+
+
/**
* Use to create the structure of features from plugin and feature in eclipse
* Constructor.
*
- * @param domain the editing domain
- * @param rootPackage the package root
- * @param bundleList the list of feature that will be retro-engineered
+ * @param domain
+ * the editing domain
+ * @param rootPackage
+ * the package root
+ * @param bundleList
+ * the list of feature that will be retro-engineered
*/
- 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;
+ 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);
+ SimpleFeatureArchitectureSnapshotDesigner snapshotDesigner = new SimpleFeatureArchitectureSnapshotDesigner(rootPackage, bundleList);
snapshotDesigner.runImportBundles();
}
-
+
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java
index 8e2113862e1..920dd589eda 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/command/SimplePluginsArchitectureSnapshotCommand.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -28,29 +28,32 @@ import org.eclipse.uml2.uml.Package;
public class SimplePluginsArchitectureSnapshotCommand extends RecordingCommand {
protected Package rootPackage;
- protected ArrayList<Object> bundleList=null;
+ protected ArrayList<Object> bundleList = null;
/**
- *
+ *
* Constructor.
*
- * @param domain the domain mandatory to launch the command
- * @param rootPackage the root package in which the sub-packages will be created
- * @param bundleList the list of bundle for the retro engineering
+ * @param domain
+ * the domain mandatory to launch the command
+ * @param rootPackage
+ * the root package in which the sub-packages will be created
+ * @param bundleList
+ * the list of bundle for the retro engineering
*/
- public SimplePluginsArchitectureSnapshotCommand(TransactionalEditingDomain domain,Package rootPackage, ArrayList<Object> bundleList) {
- super(domain,"Import Bundles", "Model architecture from current workspace");
- this.rootPackage=rootPackage;
- this.bundleList=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;
}
-
+
@Override
protected void doExecute() {
- SimpleArchitectureSnapshotDesigner snapshotDesigner= new SimpleArchitectureSnapshotDesigner(rootPackage, bundleList);
+ SimpleArchitectureSnapshotDesigner snapshotDesigner = new SimpleArchitectureSnapshotDesigner(rootPackage, bundleList);
snapshotDesigner.runImportBundles();
}
-
+
}
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 79b48d2dde3..133610b1f05 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -56,14 +56,14 @@ import org.osgi.framework.VersionRange;
*
*/
@SuppressWarnings("restriction")
-public abstract class ArchitectureSnapshotDesigner{
- protected HashMap<String, Object> bundlesIndex=null;
- protected HashMap<String, Component> createdFeatureIndex=null;
- protected HashMap<String, Object> featureIndex=null;
- protected BundleDesignerRegistry bundleDesignerRegistry=null;
- protected int dependenciesN=0;
- protected ArrayList<Object>bundleInitialList=null;
- protected int dependencyLevelMax=1;
+public abstract class ArchitectureSnapshotDesigner {
+ protected HashMap<String, Object> bundlesIndex = null;
+ protected HashMap<String, Component> createdFeatureIndex = null;
+ protected HashMap<String, Object> featureIndex = null;
+ protected BundleDesignerRegistry bundleDesignerRegistry = null;
+ protected int dependenciesN = 0;
+ protected ArrayList<Object> bundleInitialList = null;
+ protected int dependencyLevelMax = 1;
@@ -74,23 +74,25 @@ public abstract class ArchitectureSnapshotDesigner{
protected Package rootPackage;
private Bundle systemBundle;
- private ArchitectureSnapshotDesigner (Package rootPackage) {
- this.rootPackage=rootPackage;
- bundleDesignerRegistry= new BundleDesignerRegistry();
- createdFeatureIndex= new HashMap<String, Component>();
+ private ArchitectureSnapshotDesigner(Package rootPackage) {
+ this.rootPackage = rootPackage;
+ bundleDesignerRegistry = new BundleDesignerRegistry();
+ createdFeatureIndex = new HashMap<String, Component>();
}
+
/**
- *
+ *
* Constructor.
*
* @param rootPackage
- * @param bundleInitialList must not be null
+ * @param bundleInitialList
+ * must not be null
*/
- public ArchitectureSnapshotDesigner (Package rootPackage, ArrayList<Object>bundleInitialList) {
+ public ArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
this(rootPackage);
- assert(bundleInitialList!=null);
- this.bundleInitialList=bundleInitialList;
+ assert (bundleInitialList != null);
+ this.bundleInitialList = bundleInitialList;
}
@@ -98,31 +100,32 @@ public abstract class ArchitectureSnapshotDesigner{
* this method is used to launch the import of bundle into models
*/
public abstract void runImportBundles();
+
/**
- *
+ *
* @return bundles loaded in the platform
*/
public static ArrayList<Bundle> getLoadedBundles() {
- ArrayList<Bundle> pluginList= new ArrayList<Bundle>();
- Bundle[] bundleArray=PDECore.getDefault().getBundleContext().getBundles();
+ ArrayList<Bundle> pluginList = new ArrayList<Bundle>();
+ Bundle[] bundleArray = PDECore.getDefault().getBundleContext().getBundles();
pluginList.addAll(Arrays.asList(bundleArray));
return pluginList;
}
/**
- *
+ *
* @return the list of bundle description contained in the workspace
*/
- public static ArrayList<IBundleProjectDescription>getWorkspaceBundle(){
- ArrayList<IBundleProjectDescription> bundleProjectList=new ArrayList<IBundleProjectDescription>();
- IProject[] project=ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ public static ArrayList<IBundleProjectDescription> getWorkspaceBundle() {
+ ArrayList<IBundleProjectDescription> bundleProjectList = new ArrayList<IBundleProjectDescription>();
+ IProject[] project = ResourcesPlugin.getWorkspace().getRoot().getProjects();
BundleContext context = Activator.getDefault().getBundleContext();
ServiceReference<?> ref = context.getServiceReference(IBundleProjectService.class.getName());
- IBundleProjectService BundleProjectservice = (IBundleProjectService)context.getService(ref);
- for(int i = 0; i < project.length; i++) {
+ 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]);
+ if ((project[i].getNature(IBundleProjectDescription.PLUGIN_NATURE)) != null) {
+ IBundleProjectDescription bundleDescription = BundleProjectservice.getDescription(project[i]);
bundleProjectList.add(bundleDescription);
}
} catch (CoreException e) {
@@ -133,23 +136,23 @@ public abstract class ArchitectureSnapshotDesigner{
}
/**
- *
+ *
* @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();
+ 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();
+ public static ArrayList<Object> getFeature() {
+ ArrayList<Object> featureList = new ArrayList<Object>();
+ IFeatureModel[] featureModels = PDECore.getDefault().getFeatureModelManager().getModels();
featureList.addAll(Arrays.asList(featureModels));
return featureList;
}
@@ -157,61 +160,63 @@ public abstract class ArchitectureSnapshotDesigner{
/**
* model all bundle contained in the workspaces
- * @param pluginPackage the name of UML package that represent the plugin
+ *
+ * @param pluginPackage
+ * the name of UML package that represent the plugin
*/
- protected void modelBundles(Package pluginPackage){
- ArrayList<Object> bundleProjects= new ArrayList<Object>();
+ protected void modelBundles(Package pluginPackage) {
+ ArrayList<Object> bundleProjects = new ArrayList<Object>();
bundleProjects.addAll(bundleInitialList);
- Iterator<Object> bundleProjectsIterator= bundleProjects.iterator();
- while(bundleProjectsIterator.hasNext()) {
- Object bundleProject = (Object)bundleProjectsIterator.next();
- modelBundle(pluginPackage, bundleProject,0);
+ Iterator<Object> bundleProjectsIterator = bundleProjects.iterator();
+ while (bundleProjectsIterator.hasNext()) {
+ Object bundleProject = bundleProjectsIterator.next();
+ modelBundle(pluginPackage, bundleProject, 0);
}
- System.out.println("created bundles numbers: "+createdFeatureIndex.keySet().size());
- System.out.println("dependencies: "+dependenciesN);
+ System.out.println("created bundles numbers: " + createdFeatureIndex.keySet().size());
+ System.out.println("dependencies: " + 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 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 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){
+ // }
+ // 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());
+ // 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());
//
- // }
+ // }
protected void modelPseudoBundle(Package pluginPackage, String ID) {
- Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
- System.out.println("PS-->"+ID);
+ Component bundleComponent = UMLFactory.eINSTANCE.createComponent();
+ System.out.println("PS-->" + ID);
bundleComponent.setName(ID);
pluginPackage.getPackagedElements().add(bundleComponent);
createdFeatureIndex.put(ID, bundleComponent);
@@ -221,103 +226,104 @@ public abstract class ArchitectureSnapshotDesigner{
/**
* Model a bundle into the plugins packages:
* <UL>
- * <LI> model the bundle as a stereotyped UML component
+ * <LI>model the bundle as a stereotyped UML component
* <LI>add links to required bundle
- * <LI> fill information about exported packages
+ * <LI>fill information about exported packages
* </UL>
- *
+ *
*
* @param pluginPackage
* @param bundleProjectsIterator
*/
protected void modelBundle(Package pluginPackage, Object bundleProject, int currentLevel) {
- if(bundleProject instanceof IFeatureModel){
- if(!(createdFeatureIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject)))){
- Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
- System.out.println("F-->"+bundleDesignerRegistry.getSymbolicName(bundleProject));
+ if (bundleProject instanceof IFeatureModel) {
+ if (!(createdFeatureIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject)))) {
+ Component bundleComponent = UMLFactory.eINSTANCE.createComponent();
+ System.out.println("F-->" + bundleDesignerRegistry.getSymbolicName(bundleProject));
bundleComponent.setName(bundleDesignerRegistry.getSymbolicName(bundleProject));
pluginPackage.getPackagedElements().add(bundleComponent);
- Stereotype pluginStereotype=bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.FEATURE_STEREOTYPE);
+ Stereotype pluginStereotype = bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.FEATURE_STEREOTYPE);
bundleComponent.applyStereotype(pluginStereotype);
- //add in the index of bundles
- if( bundleDesignerRegistry.getSymbolicName(bundleProject)!=null){
+ // add in the index of bundles
+ if (bundleDesignerRegistry.getSymbolicName(bundleProject) != null) {
createdFeatureIndex.put(bundleDesignerRegistry.getSymbolicName(bundleProject), bundleComponent);
}
- else{
+ else {
System.err.println("bundle symbolic name is null");
}
fillRequiredBundle(bundleComponent, bundleProject, pluginPackage, currentLevel);
- fillReferencedPlugins(pluginPackage,(IFeatureModel) bundleProject, currentLevel, bundleComponent);
+ fillReferencedPlugins(pluginPackage, (IFeatureModel) bundleProject, currentLevel, bundleComponent);
- //bundleDesignerRegistry.fillPluginProperties(bundleComponent, bundleProject);
- //bundleDesignerRegistry.fillExportedPackages(bundleComponent, bundleProject);
+ // bundleDesignerRegistry.fillPluginProperties(bundleComponent, bundleProject);
+ // bundleDesignerRegistry.fillExportedPackages(bundleComponent, bundleProject);
}
- }else{
+ } else {
- if(!(createdFeatureIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject)))){
+ if (!(createdFeatureIndex.containsKey(bundleDesignerRegistry.getSymbolicName(bundleProject)))) {
- Component bundleComponent= UMLFactory.eINSTANCE.createComponent();
+ Component bundleComponent = UMLFactory.eINSTANCE.createComponent();
- System.out.println("P ("+currentLevel+")-->"+bundleDesignerRegistry.getSymbolicName(bundleProject));
+ System.out.println("P (" + currentLevel + ")-->" + bundleDesignerRegistry.getSymbolicName(bundleProject));
bundleComponent.setName(bundleDesignerRegistry.getSymbolicName(bundleProject));
pluginPackage.getPackagedElements().add(bundleComponent);
- Stereotype pluginStereotype=bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
+ Stereotype pluginStereotype = bundleComponent.getApplicableStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
bundleComponent.applyStereotype(pluginStereotype);
- //add in the index of bundles
- if("org.eclipse.osgi".equals(bundleDesignerRegistry.getSymbolicName(bundleProject))){
+ // add in the index of bundles
+ if ("org.eclipse.osgi".equals(bundleDesignerRegistry.getSymbolicName(bundleProject))) {
createdFeatureIndex.put(org.osgi.framework.Constants.SYSTEM_BUNDLE_SYMBOLICNAME, bundleComponent);
}
- if( bundleDesignerRegistry.getSymbolicName(bundleProject)!=null){
+ if (bundleDesignerRegistry.getSymbolicName(bundleProject) != null) {
createdFeatureIndex.put(bundleDesignerRegistry.getSymbolicName(bundleProject), bundleComponent);
}
- else{
+ else {
System.err.println("bundle symbolic name is null");
}
- fillRequiredBundle(bundleComponent, bundleProject, pluginPackage,currentLevel );
+ fillRequiredBundle(bundleComponent, bundleProject, pluginPackage, currentLevel);
bundleDesignerRegistry.fillPluginProperties(bundleComponent, bundleProject);
bundleDesignerRegistry.fillExportedPackages(bundleComponent, bundleProject);
- modelExtensions(bundleComponent,bundleProject, currentLevel);
+ modelExtensions(bundleComponent, bundleProject, currentLevel);
}
}
}
- protected void modelExtensions(Component bundleComponent,Object bundleProject, int currentLevel) {
- if(currentLevel>=dependencyLevelMax){
+
+ protected void modelExtensions(Component bundleComponent, Object bundleProject, int currentLevel) {
+ if (currentLevel >= dependencyLevelMax) {
return;
}
-
- //list all extensions use and declaration
+
+ // list all extensions use and declaration
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
- IExtension[] extensions= extensionRegistry.getExtensions(bundleDesignerRegistry.getSymbolicName(bundleProject));
- System.out.println("nb extension "+extensions.length);
-
-
- for(int i = 0; i < extensions.length; i++) {
- //use or declaration create it!
- Port clientPort=bundleComponent.createOwnedPort(extensions[i].getExtensionPointUniqueIdentifier(), null);
- String ownerID=extensionRegistry.getExtensionPoint(extensions[i].getExtensionPointUniqueIdentifier()).getNamespaceIdentifier();
- System.out.println("---------> "+extensions[i].getExtensionPointUniqueIdentifier()+" FROM "+ownerID );
-
- //look for the plugin that declare the extension point
- Object foundBundle=getBundle(ownerID );
- if (foundBundle!=null){
- if(!(createdFeatureIndex.containsKey(ownerID))) {
- modelBundle(bundleComponent.getNearestPackage(),foundBundle, currentLevel+1);
+ IExtension[] extensions = extensionRegistry.getExtensions(bundleDesignerRegistry.getSymbolicName(bundleProject));
+ System.out.println("nb extension " + extensions.length);
+
+
+ for (int i = 0; i < extensions.length; i++) {
+ // use or declaration create it!
+ Port clientPort = bundleComponent.createOwnedPort(extensions[i].getExtensionPointUniqueIdentifier(), null);
+ String ownerID = extensionRegistry.getExtensionPoint(extensions[i].getExtensionPointUniqueIdentifier()).getNamespaceIdentifier();
+ System.out.println("---------> " + extensions[i].getExtensionPointUniqueIdentifier() + " FROM " + ownerID);
+
+ // look for the plugin that declare the extension point
+ Object foundBundle = getBundle(ownerID);
+ if (foundBundle != null) {
+ if (!(createdFeatureIndex.containsKey(ownerID))) {
+ modelBundle(bundleComponent.getNearestPackage(), foundBundle, currentLevel + 1);
}
}
else {
- modelPseudoBundle(bundleComponent.getNearestPackage(),ownerID);
+ modelPseudoBundle(bundleComponent.getNearestPackage(), ownerID);
}
- Component componentOwner=createdFeatureIndex.get(ownerID);
+ Component componentOwner = createdFeatureIndex.get(ownerID);
// if the declaration of the bundle is the same bundle , this is a declaration so no link to create
- if(!componentOwner.equals(bundleComponent)){
- Port supplierPort= componentOwner.getOwnedPort(extensions[i].getExtensionPointUniqueIdentifier(), null);
- if(supplierPort==null ){
- supplierPort=componentOwner.createOwnedPort(extensions[i].getExtensionPointUniqueIdentifier(), null);
+ if (!componentOwner.equals(bundleComponent)) {
+ Port supplierPort = componentOwner.getOwnedPort(extensions[i].getExtensionPointUniqueIdentifier(), null);
+ if (supplierPort == null) {
+ supplierPort = componentOwner.createOwnedPort(extensions[i].getExtensionPointUniqueIdentifier(), null);
}
modelRelationExtensionBased(bundleComponent, extensions[i], clientPort, supplierPort);
}
@@ -326,15 +332,20 @@ public abstract class ArchitectureSnapshotDesigner{
/**
* create a model element between 2 elements that represents relation between two extension point
- * @param bundleComponent the component that use extension
- * @param extension the extension point
- * @param clientPort the port that represent the use to the extension point
- * @param supplierPort the port that represent the declaration of this extension point
+ *
+ * @param bundleComponent
+ * the component that use extension
+ * @param extension
+ * the extension point
+ * @param clientPort
+ * the port that represent the use to the extension point
+ * @param supplierPort
+ * the port that represent the declaration of this extension point
*/
protected void modelRelationExtensionBased(Component bundleComponent, IExtension extension, Port clientPort, Port supplierPort) {
- Dependency dependency=UMLFactory.eINSTANCE.createDependency();
+ Dependency dependency = UMLFactory.eINSTANCE.createDependency();
dependency.setName(extension.getExtensionPointUniqueIdentifier());
- //bundleComponent.getNearestPackage().getPackagedElements().add(dependency);
+ // bundleComponent.getNearestPackage().getPackagedElements().add(dependency);
bundleComponent.getPackagedElements().add(dependency);
dependency.getClients().add(clientPort);
dependency.getSuppliers().add(supplierPort);
@@ -342,23 +353,28 @@ public abstract class ArchitectureSnapshotDesigner{
/**
* fill the list of referenced plug-ins of a feature. for each plug-in a property will be created
- * @param pluginPackage the package that will contain plug-ins
- * @param bundleProject the bundle project that represents a feature
- * @param currentLevel the current level about dependency depth
- * @param bundleComponent model in UML that correspond to the bundle project
+ *
+ * @param pluginPackage
+ * the package that will contain plug-ins
+ * @param bundleProject
+ * the bundle project that represents a feature
+ * @param currentLevel
+ * the current level about dependency depth
+ * @param bundleComponent
+ * model in UML that correspond to the bundle project
*/
protected void fillReferencedPlugins(Package pluginPackage, IFeatureModel bundleProject, int currentLevel, Component bundleComponent) {
- IFeaturePlugin[] pluginsList=bundleProject.getFeature().getPlugins();
- for(int i = 0; i < pluginsList.length; i++) {
- System.out.println("+-> P from F ("+currentLevel+")" +pluginsList[i].getId() );
- Object foundBundle=getBundle(pluginsList[i].getId() );
- if( foundBundle==null){
- System.err.println("Cannot find the plugin : "+pluginsList[i].getId() );
- System.err.println("Memory\n"+ this);
+ IFeaturePlugin[] pluginsList = bundleProject.getFeature().getPlugins();
+ for (int i = 0; i < pluginsList.length; i++) {
+ System.out.println("+-> P from F (" + currentLevel + ")" + pluginsList[i].getId());
+ Object foundBundle = getBundle(pluginsList[i].getId());
+ if (foundBundle == null) {
+ System.err.println("Cannot find the plugin : " + pluginsList[i].getId());
+ System.err.println("Memory\n" + this);
}
- else{
+ else {
modelBundle(pluginPackage, foundBundle, currentLevel);
- Component createdBundle=createdFeatureIndex.get(pluginsList[i].getId());
+ Component createdBundle = createdFeatureIndex.get(pluginsList[i].getId());
bundleComponent.createOwnedAttribute(pluginsList[i].getId(), createdBundle);
}
}
@@ -367,62 +383,62 @@ public abstract class ArchitectureSnapshotDesigner{
/**
* Ensure that the profile ADL4 eclipse has been applied
*/
- protected void initModel(){
- RegisteredProfile registeredProfile=(RegisteredProfile)RegisteredProfile.getRegisteredProfile("ADL4Eclipse");
- if(registeredProfile!=null){
+ protected void initModel() {
+ RegisteredProfile 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);
+ Profile adl4eclipseprofile = (Profile) modelResource.getContents().get(0);
PackageUtil.applyProfile(rootPackage, adl4eclipseprofile, false);
}
}
- protected Object getfeature(String name){
- if(featureIndex==null){
- featureIndex= new HashMap<String, Object>();
- IFeatureModel[] featureModels=PDECore.getDefault().getFeatureModelManager().getModels();
- for(int i = 0; i < featureModels.length; i++) {
- System.out.println("feature known: "+bundleDesignerRegistry.getSymbolicName(featureModels[i]));
+ protected Object getfeature(String name) {
+ if (featureIndex == null) {
+ featureIndex = new HashMap<String, Object>();
+ IFeatureModel[] featureModels = PDECore.getDefault().getFeatureModelManager().getModels();
+ for (int i = 0; i < featureModels.length; i++) {
+ System.out.println("feature known: " + bundleDesignerRegistry.getSymbolicName(featureModels[i]));
featureIndex.put(bundleDesignerRegistry.getSymbolicName(featureModels[i]), featureModels[i]);
}
}
return featureIndex.get(name);
}
- protected Object getBundle(String name){
+ protected Object getBundle(String name) {
- if(bundlesIndex==null){
- bundlesIndex= new HashMap<String, Object>();
- //loaded bundle
+ if (bundlesIndex == null) {
+ bundlesIndex = new HashMap<String, Object>();
+ // loaded bundle
BundleContext context = Activator.getDefault().getBundleContext();
systemBundle = context.getBundle(0);
bundlesIndex.put(org.osgi.framework.Constants.SYSTEM_BUNDLE_SYMBOLICNAME, systemBundle);
- bundlesIndex.put(bundleDesignerRegistry.getSymbolicName( systemBundle), systemBundle);
- System.out.println(bundleDesignerRegistry.getName( systemBundle)+ " "+bundleDesignerRegistry.getSymbolicName( systemBundle));
+ bundlesIndex.put(bundleDesignerRegistry.getSymbolicName(systemBundle), systemBundle);
+ System.out.println(bundleDesignerRegistry.getName(systemBundle) + " " + bundleDesignerRegistry.getSymbolicName(systemBundle));
org.osgi.framework.Bundle[] bundles = context.getBundles();
- for(int i = 0; i < bundles.length; i++) {
- if( bundleDesignerRegistry.getSymbolicName(bundles[i])!=null){
+ for (int i = 0; i < bundles.length; i++) {
+ if (bundleDesignerRegistry.getSymbolicName(bundles[i]) != null) {
bundlesIndex.put(bundleDesignerRegistry.getSymbolicName(bundles[i]), bundles[i]);
}
- else{
+ else {
System.err.println("Bundle has a symbolic name null!");
}
- if( bundleDesignerRegistry.getName(bundles[i])!=null){
+ if (bundleDesignerRegistry.getName(bundles[i]) != null) {
bundlesIndex.put(bundleDesignerRegistry.getName(bundles[i]), bundles[i]);
}
- else{
+ else {
System.err.println("Bundle has a name null!");
}
}
- IProject[] project=ResourcesPlugin.getWorkspace().getRoot().getProjects();
- //bundle Workspace
+ 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++) {
+ 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]);
+ if ((project[i].getNature(IBundleProjectDescription.PLUGIN_NATURE)) != null) {
+ IBundleProjectDescription bundleDescription = BundleProjectservice.getDescription(project[i]);
bundlesIndex.put(bundleDesignerRegistry.getBundleValue(bundleDescription, org.osgi.framework.Constants.BUNDLE_NAME), bundleDescription);
}
} catch (CoreException e) {
@@ -437,88 +453,94 @@ public abstract class ArchitectureSnapshotDesigner{
return bundlesIndex.get(name);
}
+
/**
- * Model the required bundle. if it not exist the bundle is modeling.
+ * 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 bundleComponent
+ * the description of the bundle
* @param bundleProject
*/
- protected void fillRequiredBundle(Component bundleComponent,Object bundleProject,Package library, int currentLevel ) {
- ArrayList<ReferencedOSGIElement> requiredBundleNameList=bundleDesignerRegistry.getRequiredBundle(bundleComponent, bundleProject);
- Iterator<ReferencedOSGIElement> bundleNameIterator= requiredBundleNameList.iterator();
- if(currentLevel>=dependencyLevelMax){
+ protected void fillRequiredBundle(Component bundleComponent, Object bundleProject, Package library, int currentLevel) {
+ ArrayList<ReferencedOSGIElement> requiredBundleNameList = bundleDesignerRegistry.getRequiredBundle(bundleComponent, bundleProject);
+ Iterator<ReferencedOSGIElement> bundleNameIterator = requiredBundleNameList.iterator();
+ if (currentLevel >= dependencyLevelMax) {
return;
}
- while(bundleNameIterator.hasNext()) {
+ while (bundleNameIterator.hasNext()) {
dependenciesN++;
- ReferencedOSGIElement bundleRef = (ReferencedOSGIElement)bundleNameIterator.next();
- Component requiredComponent=null;
- Object foundBundle=getBundle(bundleRef.getSymbolicName() );
-
- if(bundleRef.isOptional()||foundBundle!=null){
- if (foundBundle!=null){
- if((!(createdFeatureIndex.containsKey(bundleRef.getSymbolicName())))&&(!(createdFeatureIndex.containsKey(bundleRef.getSymbolicName())))) {
- if( isInitialPlugin(bundleRef.getSymbolicName())){
- modelBundle(library,foundBundle, currentLevel);
+ ReferencedOSGIElement bundleRef = bundleNameIterator.next();
+ Component requiredComponent = null;
+ Object foundBundle = getBundle(bundleRef.getSymbolicName());
+
+ if (bundleRef.isOptional() || foundBundle != null) {
+ if (foundBundle != null) {
+ if ((!(createdFeatureIndex.containsKey(bundleRef.getSymbolicName()))) && (!(createdFeatureIndex.containsKey(bundleRef.getSymbolicName())))) {
+ if (isInitialPlugin(bundleRef.getSymbolicName())) {
+ modelBundle(library, foundBundle, currentLevel);
+ }
+ else {
+ modelBundle(library, foundBundle, currentLevel + 1);
}
- else{
- modelBundle(library,foundBundle, currentLevel+1);}
}
}
else {
- modelPseudoBundle(library,bundleRef.getSymbolicName());
+ modelPseudoBundle(library, bundleRef.getSymbolicName());
}
- requiredComponent=createdFeatureIndex.get(bundleRef.getSymbolicName());
- Dependency dependency=UMLFactory.eINSTANCE.createDependency();
+ requiredComponent = createdFeatureIndex.get(bundleRef.getSymbolicName());
+ Dependency dependency = UMLFactory.eINSTANCE.createDependency();
dependency.setName(requiredComponent.getName());
- //bundleComponent.getNearestPackage().getPackagedElements().add(dependency);
+ // bundleComponent.getNearestPackage().getPackagedElements().add(dependency);
bundleComponent.getPackagedElements().add(dependency);
dependency.getClients().add(bundleComponent);
dependency.getSuppliers().add(requiredComponent);
- Stereotype bRef_stereotype= dependency.getApplicableStereotype(IOSGIStereotype.BUNDLEREFERENCE_);
+ Stereotype bRef_stereotype = dependency.getApplicableStereotype(IOSGIStereotype.BUNDLEREFERENCE_);
dependency.applyStereotype(bRef_stereotype);
- VersionRange versionRange=bundleRef.getVersion();
- if( versionRange!=null){
- if( versionRange.getRight()==null){
+ 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{
+ 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());
- }
+ 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());
+ }
}
}
- else if ((!bundleRef.isOptional())&&foundBundle==null){
- System.err.println("pb: impossible to find the get the bundle dependency "+ bundleRef.getSymbolicName()+ " for "+bundleDesignerRegistry.getSymbolicName(bundleProject));
- System.err.println("Memory\n"+ this);}
+ else if ((!bundleRef.isOptional()) && foundBundle == null) {
+ System.err.println("pb: impossible to find the get the bundle dependency " + bundleRef.getSymbolicName() + " for " + bundleDesignerRegistry.getSymbolicName(bundleProject));
+ System.err.println("Memory\n" + this);
+ }
}
}
@Override
public String toString() {
- String out= "loaded bundles:\n";
- for(Iterator<String> iterator = bundlesIndex.keySet().iterator(); iterator.hasNext();) {
- String id = (String)iterator.next();
- out=out+"\n"+id;
+ String out = "loaded bundles:\n";
+ for (Iterator<String> iterator = bundlesIndex.keySet().iterator(); iterator.hasNext();) {
+ String id = iterator.next();
+ out = out + "\n" + id;
}
- out=out+ "\ncreated bundles:\n";
- for(Iterator<String> iterator = createdFeatureIndex.keySet().iterator(); iterator.hasNext();) {
- String id = (String)iterator.next();
- out=out+"\n"+id;
+ out = out + "\ncreated bundles:\n";
+ for (Iterator<String> iterator = createdFeatureIndex.keySet().iterator(); iterator.hasNext();) {
+ String id = iterator.next();
+ out = out + "\n" + id;
}
return out;
}
+
protected boolean isInitialPlugin(String name) {
- Iterator<Object> bundleProjectsIterator= bundleInitialList.iterator();
- while(bundleProjectsIterator.hasNext()) {
- Object bundleProject = (Object)bundleProjectsIterator.next();
- if(name.equals(bundleDesignerRegistry.getSymbolicName(bundleProject))){
+ Iterator<Object> bundleProjectsIterator = bundleInitialList.iterator();
+ while (bundleProjectsIterator.hasNext()) {
+ Object bundleProject = bundleProjectsIterator.next();
+ if (name.equals(bundleDesignerRegistry.getSymbolicName(bundleProject))) {
return true;
}
}
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 73a714482ce..871607a9b8c 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -18,28 +18,29 @@ import java.util.ArrayList;
import org.eclipse.uml2.uml.Package;
/**
- * import the list of plugins from all loading plugins
+ * import the list of plugins from all loading plugins
*
*/
- public class CompleteArchitectureSnapshotDesigner extends ArchitectureSnapshotDesigner {
-
+public class CompleteArchitectureSnapshotDesigner extends ArchitectureSnapshotDesigner {
+
/**
- *
+ *
* Constructor.
*
* @param rootPackage
* @param bundleInitialList
*/
- public CompleteArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object>bundleInitialList) {
+ public CompleteArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
super(rootPackage, bundleInitialList);
- dependencyLevelMax=30;
+ dependencyLevelMax = 30;
}
+
@Override
protected void initModel() {
super.initModel();
}
-
+
@Override
public void runImportBundles() {
initModel();
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
index c4c32ac7040..f554f1f2975 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -24,7 +24,7 @@ import org.eclipse.uml2.uml.Package;
public class CompleteFeatureArchitectureSnapshotDesigner extends ArchitectureSnapshotDesigner {
/**
- *
+ *
* Constructor.
*
* @param rootPackage
@@ -33,10 +33,11 @@ public class CompleteFeatureArchitectureSnapshotDesigner extends ArchitectureSna
public CompleteFeatureArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
super(rootPackage, bundleInitialList);
}
+
@Override
public void runImportBundles() {
initModel();
modelBundles(rootPackage);
}
-
+
}
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 6c26991c524..9d1285f5325 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -19,30 +19,32 @@ import org.eclipse.uml2.uml.Package;
/**
- * this architecture designer is used to construct the structure from workspace
+ * this architecture designer is used to construct the structure from workspace
*
*/
public class SimpleArchitectureSnapshotDesigner extends ArchitectureSnapshotDesigner {
-
+
/**
- *
+ *
* Constructor.
*
- * @param rootPackage the root package where the sub-packages "Architecture" and "platform" will be created
- * @param bundleInitialList the list of bundle that will be retro engineered.
+ * @param rootPackage
+ * the root package where the sub-packages "Architecture" and "platform" will be created
+ * @param bundleInitialList
+ * the list of bundle that will be retro engineered.
*/
- public SimpleArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object>bundleInitialList) {
+ public SimpleArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
super(rootPackage, bundleInitialList);
// the simple user cannot choose the level of dependency it has only the level 1
- dependencyLevelMax=1;
+ dependencyLevelMax = 1;
}
-
+
@Override
public void runImportBundles() {
initModel();
modelBundles(rootPackage);
-
+
}
-
+
}
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
index 8821203a151..9e6bcad9990 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -28,34 +28,36 @@ public class SimpleFeatureArchitectureSnapshotDesigner extends CompleteFeatureAr
protected Package platform;
protected Package architecturefeature;
protected Package platformfeature;
-
+
/**
- *
+ *
* Constructor.
*
- * @param rootPackage the root package where the sub-packages "Architecture" and "platform" will be created
- * @param bundleInitialList the list of feature that will be retro engineered.
+ * @param rootPackage
+ * the root package where the sub-packages "Architecture" and "platform" will be created
+ * @param bundleInitialList
+ * the list of feature that will be retro engineered.
*/
public SimpleFeatureArchitectureSnapshotDesigner(Package rootPackage, ArrayList<Object> bundleInitialList) {
super(rootPackage, bundleInitialList);
- this.dependencyLevelMax=1;
+ this.dependencyLevelMax = 1;
}
-
-
+
+
@Override
protected void initModel() {
super.initModel();
- architecture=rootPackage.createNestedPackage("Architecture");
- platform=rootPackage.createNestedPackage("Platform");
-
+ 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/AbstractBundleDescriptionDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/AbstractBundleDescriptionDesigner.java
index 4de4206bcc9..90fb5e07f45 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/AbstractBundleDescriptionDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/AbstractBundleDescriptionDesigner.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -35,159 +35,160 @@ public abstract class AbstractBundleDescriptionDesigner implements IBundleDescri
* @param key
* @return the value that corresponds to the key
*/
-
- public abstract String getBundleValue( Object bundleProject, String key);
-
+
+ public abstract String getBundleValue(Object bundleProject, String key);
+
/**
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#fillPluginProperties(org.eclipse.uml2.uml.Component, org.osgi.framework.Bundle)
*
* @param bundleComponent
* @param bundleProject
*/
-
- public void fillPluginProperties(Component bundleComponent,Object bundleProject ){
- Stereotype pluginStereotype= bundleComponent.getAppliedStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
- //bundleProject.getHeader(Constants.BUNDLE_ACTIVATIONPOLICY);
- String activationPolicy=getBundleValue( bundleProject, Constants.BUNDLE_ACTIVATIONPOLICY);
- if("lazy".equals(activationPolicy)){
+
+ public void fillPluginProperties(Component bundleComponent, Object bundleProject) {
+ Stereotype pluginStereotype = bundleComponent.getAppliedStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
+ // bundleProject.getHeader(Constants.BUNDLE_ACTIVATIONPOLICY);
+ String activationPolicy = getBundleValue(bundleProject, Constants.BUNDLE_ACTIVATIONPOLICY);
+ if ("lazy".equals(activationPolicy)) {
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_HASLAZYACTIVATIONPOLICY_ATT, true);
}
- else if(activationPolicy==null){
+ else if (activationPolicy == null) {
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_HASLAZYACTIVATIONPOLICY_ATT, null);
}
- else{
+ else {
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_HASLAZYACTIVATIONPOLICY_ATT, null);
}
- //Constants.BUNDLE_ACTIVATOR;
- String activator=getBundleValue( bundleProject, Constants.BUNDLE_ACTIVATOR);
+ // Constants.BUNDLE_ACTIVATOR;
+ String activator = getBundleValue(bundleProject, Constants.BUNDLE_ACTIVATOR);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_ACTIVATOR_ATT, activator);
// BUNDLE_CATEGORY
- String category=getBundleValue( bundleProject, Constants.BUNDLE_CATEGORY);
- if(category==null){
+ String category = getBundleValue(bundleProject, Constants.BUNDLE_CATEGORY);
+ if (category == null) {
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_CATEGORY_ATT, category);
}
- //Constants.BUNDLE_CLASSPATH
- String class_path=getBundleValue( bundleProject, Constants.BUNDLE_CLASSPATH);
+ // Constants.BUNDLE_CLASSPATH
+ String class_path = getBundleValue(bundleProject, Constants.BUNDLE_CLASSPATH);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_CLASSPATH_ATT, class_path);
- //Constants.BUNDLE_CONTACTADDRESS
- String contactAdress=getBundleValue( bundleProject, Constants.BUNDLE_CONTACTADDRESS);
+ // Constants.BUNDLE_CONTACTADDRESS
+ String contactAdress = getBundleValue(bundleProject, Constants.BUNDLE_CONTACTADDRESS);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_CONTACTADDRESS_ATT, contactAdress);
// Constants.BUNDLE_COPYRIGHT
- String copyright=getBundleValue( bundleProject, Constants.BUNDLE_COPYRIGHT);
+ String copyright = getBundleValue(bundleProject, Constants.BUNDLE_COPYRIGHT);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_COPYRIGHT_ATT, copyright);
- //BUNDLE_DESCRIPTION
- String description=getBundleValue( bundleProject, Constants.BUNDLE_DESCRIPTION);
+ // BUNDLE_DESCRIPTION
+ String description = getBundleValue(bundleProject, Constants.BUNDLE_DESCRIPTION);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_DESCRIPTION_ATT, description);
- //BUNDLE_DOCURL
- String docurl=getBundleValue( bundleProject, Constants.BUNDLE_DOCURL);
+ // BUNDLE_DOCURL
+ String docurl = getBundleValue(bundleProject, Constants.BUNDLE_DOCURL);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_DOCURL_ATT, docurl);
- //BUNDLE_LOCALIZATION
- String localization=getBundleValue( bundleProject, Constants.BUNDLE_LOCALIZATION);
+ // BUNDLE_LOCALIZATION
+ String localization = getBundleValue(bundleProject, Constants.BUNDLE_LOCALIZATION);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_LOCALIZATION_ATT, localization);
- //Constants.BUNDLE_MANIFESTVERSION
- String manisfestVerion=getBundleValue( bundleProject, Constants.BUNDLE_MANIFESTVERSION);
+ // Constants.BUNDLE_MANIFESTVERSION
+ String manisfestVerion = getBundleValue(bundleProject, Constants.BUNDLE_MANIFESTVERSION);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_NAME_ATT, manisfestVerion);
- //BUNDLE_NAME
- String name=getBundleValue( bundleProject, Constants.BUNDLE_NAME);
- //String buddypolicy=getBundleValue( bundleProject, BUDDY_LOADER);
- if (name!=null && name.toLowerCase().contains("incubation")){
- bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_ISINCUBATION_ATT, true);}
- else{
+ // BUNDLE_NAME
+ String name = getBundleValue(bundleProject, Constants.BUNDLE_NAME);
+ // String buddypolicy=getBundleValue( bundleProject, BUDDY_LOADER);
+ if (name != null && name.toLowerCase().contains("incubation")) {
+ bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_ISINCUBATION_ATT, true);
+ }
+ else {
bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_ISINCUBATION_ATT, false);
}
- name=name.replace("(Incubation)", "");
- name=name.replace("(incubation)", "");
- name=name.replace("Incubation", "");
- name=name.replace("incubation", "");
+ name = name.replace("(Incubation)", "");
+ name = name.replace("(incubation)", "");
+ name = name.replace("Incubation", "");
+ name = name.replace("incubation", "");
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_NAME_ATT, name.trim());
- //BUNDLE_NATIVECODE
- String nativeCode=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE);
+ // BUNDLE_NATIVECODE
+ String nativeCode = getBundleValue(bundleProject, Constants.BUNDLE_NATIVECODE);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_NATIVECODE_ATT, nativeCode);
- // String nativeCodeLanguage=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_LANGUAGE);
- //String activator=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_OSNAME);
- //String activator=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_OSVERSION);
- //String activator=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_PROCESSOR);
+ // String nativeCodeLanguage=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_LANGUAGE);
+ // String activator=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_OSNAME);
+ // String activator=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_OSVERSION);
+ // String activator=getBundleValue( bundleProject, Constants.BUNDLE_NATIVECODE_PROCESSOR);
- //BUNDLE_REQUIREDEXECUTIONENVIRONMENT
+ // BUNDLE_REQUIREDEXECUTIONENVIRONMENT
@SuppressWarnings("deprecation")
- String requiredExecutionEnv=getBundleValue( bundleProject, Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
+ String requiredExecutionEnv = getBundleValue(bundleProject, Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_REQUIREDEXECUTIONENVIRONMENT_ATT, requiredExecutionEnv);
- //BUNDLE_SYMBOLICNAME
- bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_SYMBOLICNAME_ATT,getSymbolicName(bundleProject));
+ // BUNDLE_SYMBOLICNAME
+ bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_SYMBOLICNAME_ATT, getSymbolicName(bundleProject));
- //Constants.BUNDLE_UPDATELOCATION
- String updateLocation=getBundleValue( bundleProject, Constants.BUNDLE_UPDATELOCATION);
+ // Constants.BUNDLE_UPDATELOCATION
+ String updateLocation = getBundleValue(bundleProject, Constants.BUNDLE_UPDATELOCATION);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_UPDATELOCATION_ATT, updateLocation);
- //String activator=getBundleValue( bundleProject, Constants.BUNDLE_VENDOR);
- String vendor=getBundleValue( bundleProject, Constants.BUNDLE_VENDOR);
+ // String activator=getBundleValue( bundleProject, Constants.BUNDLE_VENDOR);
+ String vendor = getBundleValue(bundleProject, Constants.BUNDLE_VENDOR);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_VENDOR_ATT, vendor);
- //String activator=getBundleValue( bundleProject, Constants.BUNDLE_VERSION);
- String version=getBundleValue( bundleProject, Constants.BUNDLE_VERSION);
+ // String activator=getBundleValue( bundleProject, Constants.BUNDLE_VERSION);
+ String version = getBundleValue(bundleProject, Constants.BUNDLE_VERSION);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_VERSION_ATT, version);
- //String activator=getBundleValue( bundleProject, Constants.BUNDLE_VERSION_ATTRIBUTE);
-
- //PLUGIN ATTRIBUTE
- //http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fbundle_manifest.html
- //Eclipse-LazyStart ::= ( 'true' | 'false' ) ( ';' 'exceptions' '=' '"' exceptions-list '"' ) ?
- // exceptions-list ::= a comma ',' separated list of packages
- String lazystartExpression=getBundleValue( bundleProject, ECLIPSE_LAZYSTART);
- if (lazystartExpression!=null){
+ // String activator=getBundleValue( bundleProject, Constants.BUNDLE_VERSION_ATTRIBUTE);
+
+ // PLUGIN ATTRIBUTE
+ // http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fbundle_manifest.html
+ // Eclipse-LazyStart ::= ( 'true' | 'false' ) ( ';' 'exceptions' '=' '"' exceptions-list '"' ) ?
+ // exceptions-list ::= a comma ',' separated list of packages
+ String lazystartExpression = getBundleValue(bundleProject, ECLIPSE_LAZYSTART);
+ if (lazystartExpression != null) {
boolean lazyStartValue;
- if( lazystartExpression.contains(";")){
- String lazyStartString= lazystartExpression.substring(0, lazystartExpression.indexOf(";"));
- lazyStartValue= Boolean.valueOf(lazyStartString);
- //String lazyStartException= lazystartExpression.substring(lazystartExpression.indexOf(";"));
- //TODO: lazystartExpression
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTARTEXCEPTION_ATT,lazyStartException );
+ if (lazystartExpression.contains(";")) {
+ String lazyStartString = lazystartExpression.substring(0, lazystartExpression.indexOf(";"));
+ lazyStartValue = Boolean.valueOf(lazyStartString);
+ // String lazyStartException= lazystartExpression.substring(lazystartExpression.indexOf(";"));
+ // TODO: lazystartExpression
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTARTEXCEPTION_ATT,lazyStartException );
}
- else{
- lazyStartValue= Boolean.valueOf(lazystartExpression);
- bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTART_ATT,lazyStartValue );
- bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTARTEXCEPTION_ATT,Collections.EMPTY_LIST );
+ else {
+ lazyStartValue = Boolean.valueOf(lazystartExpression);
+ bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTART_ATT, lazyStartValue);
+ bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTARTEXCEPTION_ATT, Collections.EMPTY_LIST);
}
- }else{
- bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTART_ATT,null );
- bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTARTEXCEPTION_ATT, Collections.EMPTY_LIST );
+ } else {
+ bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTART_ATT, null);
+ bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_LAZYSTARTEXCEPTION_ATT, Collections.EMPTY_LIST);
}
- //IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT
- //String buddypolicy=getBundleValue( bundleProject, ECLIPSE_BUDDY_LOADER);
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
- //IADL4ECLIPSE_Stereotype.PLUGIN_BUNDLESHAPE_ATT
- //String bundleShape=getBundleValue( bundleProject, ECLIPSE_BUNDLE_SHAPE);
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
- //IADL4ECLIPSE_Stereotype.PLUGIN_CAPABILITY_ATT
- //String capability=getBundleValue( bundleProject, ECLIPSE_GENERICCAPABILITY);
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_CAPABILITY_ATT, capability);
- //IADL4ECLIPSE_Stereotype.PLUGIN_EXTENSIBLEAPI_ATT
- //String buddypolicy=getBundleValue( bundleProject, BUDDY_LOADER);
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
- //IADL4ECLIPSE_Stereotype.PLUGIN_GENERICCAPABILITYALIAS_ATT
- //String capabilityAlias=getBundleValue( bundleProject, ECLIPSE_GENERICCAPABILITY);
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
- //IADL4ECLIPSE_Stereotype.PLUGIN_ISINCUBATION_ATT
-
- //IADL4ECLIPSE_Stereotype.PLUGIN_PLATFORMFILTER_ATT
- String platformFilter=getBundleValue( bundleProject, ECLIPSE_PLATFORMFILTER);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT
+ // String buddypolicy=getBundleValue( bundleProject, ECLIPSE_BUDDY_LOADER);
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_BUNDLESHAPE_ATT
+ // String bundleShape=getBundleValue( bundleProject, ECLIPSE_BUNDLE_SHAPE);
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_CAPABILITY_ATT
+ // String capability=getBundleValue( bundleProject, ECLIPSE_GENERICCAPABILITY);
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_CAPABILITY_ATT, capability);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_EXTENSIBLEAPI_ATT
+ // String buddypolicy=getBundleValue( bundleProject, BUDDY_LOADER);
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_GENERICCAPABILITYALIAS_ATT
+ // String capabilityAlias=getBundleValue( bundleProject, ECLIPSE_GENERICCAPABILITY);
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_ISINCUBATION_ATT
+
+ // IADL4ECLIPSE_Stereotype.PLUGIN_PLATFORMFILTER_ATT
+ String platformFilter = getBundleValue(bundleProject, ECLIPSE_PLATFORMFILTER);
bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_PLATFORMFILTER_ATT, platformFilter);
- //IADL4ECLIPSE_Stereotype.PLUGIN_REQUIRECAPABILITY_ATT
- //String buddypolicy=getBundleValue( bundleProject, ECLIPSE_);
- //bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
+ // IADL4ECLIPSE_Stereotype.PLUGIN_REQUIRECAPABILITY_ATT
+ // String buddypolicy=getBundleValue( bundleProject, ECLIPSE_);
+ // bundleComponent.setValue(pluginStereotype, IADL4ECLIPSE_Stereotype.PLUGIN_BUDDYPOLICY_ATT, buddypolicy);
}
-
-
-
+
+
+
}
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 214a50c562d..3a77565cd2f 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -22,12 +22,12 @@ import org.osgi.framework.Bundle;
/**
- * this registry redirect the job to a good implementation.
+ * this registry redirect the job to a good implementation.
*
*/
@SuppressWarnings("restriction")
-public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
- protected WorkspaceBundleDescriptionDesigner workspaceBundleDescriptionDesigner;
+public class BundleDesignerRegistry implements IBundleDescriptionDesigner {
+ protected WorkspaceBundleDescriptionDesigner workspaceBundleDescriptionDesigner;
protected LoadedBundleDescriptionDesigner loadedBundleDescriptionDesigner;
protected FeatureDescriptionDesigner featureDescriptionDesigner;
@@ -38,96 +38,97 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
*
*/
public BundleDesignerRegistry() {
- workspaceBundleDescriptionDesigner= new WorkspaceBundleDescriptionDesigner();
- loadedBundleDescriptionDesigner= new LoadedBundleDescriptionDesigner();
- featureDescriptionDesigner =new FeatureDescriptionDesigner();
+ workspaceBundleDescriptionDesigner = new WorkspaceBundleDescriptionDesigner();
+ loadedBundleDescriptionDesigner = new LoadedBundleDescriptionDesigner();
+ featureDescriptionDesigner = new FeatureDescriptionDesigner();
}
-/**
- *
- * @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getBundleValue(java.lang.Object, java.lang.String)
- *
- * @param bundleProject
- * @param key
- * @return the value that correspond to the key
- */
+ /**
+ *
+ * @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getBundleValue(java.lang.Object, java.lang.String)
+ *
+ * @param bundleProject
+ * @param key
+ * @return the value that correspond to the key
+ */
public String getBundleValue(Object bundleProject, String key) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
return workspaceBundleDescriptionDesigner.getBundleValue(bundleProject, key);
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
return loadedBundleDescriptionDesigner.getBundleValue(bundleProject, key);
}
- else if(bundleProject instanceof IFeatureModel){
+ else if (bundleProject instanceof IFeatureModel) {
return featureDescriptionDesigner.getBundleValue(bundleProject, key);
}
return null;
}
-/**
- *
- * @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#fillPluginProperties(org.eclipse.uml2.uml.Component, java.lang.Object)
- *
- * @param bundleComponent
- * @param bundleProject
- */
+ /**
+ *
+ * @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#fillPluginProperties(org.eclipse.uml2.uml.Component, java.lang.Object)
+ *
+ * @param bundleComponent
+ * @param bundleProject
+ */
public void fillPluginProperties(Component bundleComponent, Object bundleProject) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
workspaceBundleDescriptionDesigner.fillPluginProperties(bundleComponent, bundleProject);
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
loadedBundleDescriptionDesigner.fillPluginProperties(bundleComponent, bundleProject);
}
- else if(bundleProject instanceof IFeatureModel){
- featureDescriptionDesigner.fillPluginProperties(bundleComponent, bundleProject);
+ else if (bundleProject instanceof IFeatureModel) {
+ featureDescriptionDesigner.fillPluginProperties(bundleComponent, bundleProject);
}
}
-/**
- *
- * @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getSymbolicName(java.lang.Object)
- *
- * @param bundleProject
- * @return a string that correspond to the symbolic name
- */
+ /**
+ *
+ * @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getSymbolicName(java.lang.Object)
+ *
+ * @param bundleProject
+ * @return a string that correspond to the symbolic name
+ */
public String getSymbolicName(Object bundleProject) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
return workspaceBundleDescriptionDesigner.getSymbolicName(bundleProject);
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
return loadedBundleDescriptionDesigner.getSymbolicName(bundleProject);
}
- else if(bundleProject instanceof IFeatureModel){
+ else if (bundleProject instanceof IFeatureModel) {
return featureDescriptionDesigner.getSymbolicName(bundleProject);
}
return null;
}
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#fillExportedPackages(org.eclipse.uml2.uml.Component, java.lang.Object)
*
* @param bundleComponent
* @param bundleProject
*/
- public void fillExportedPackages(Component bundleComponent, Object bundleProject ) {
- if(bundleProject instanceof IBundleProjectDescription){
+ public void fillExportedPackages(Component bundleComponent, Object bundleProject) {
+ if (bundleProject instanceof IBundleProjectDescription) {
workspaceBundleDescriptionDesigner.fillExportedPackages(bundleComponent, bundleProject);
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
loadedBundleDescriptionDesigner.fillExportedPackages(bundleComponent, bundleProject);
}
- else if(bundleProject instanceof IFeatureModel){
- featureDescriptionDesigner.fillExportedPackages(bundleComponent, bundleProject);
+ else if (bundleProject instanceof IFeatureModel) {
+ featureDescriptionDesigner.fillExportedPackages(bundleComponent, bundleProject);
}
}
+
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getRequiredBundle(org.eclipse.uml2.uml.Component, java.lang.Object)
*
* @param bundleComponent
@@ -135,29 +136,29 @@ public class BundleDesignerRegistry implements IBundleDescriptionDesigner{
* @return the list of required Bundle
*/
public ArrayList<ReferencedOSGIElement> getRequiredBundle(Component bundleComponent, Object bundleProject) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
return workspaceBundleDescriptionDesigner.getRequiredBundle(bundleComponent, bundleProject);
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
return loadedBundleDescriptionDesigner.getRequiredBundle(bundleComponent, bundleProject);
}
- else if(bundleProject instanceof IFeatureModel){
+ else if (bundleProject instanceof IFeatureModel) {
return featureDescriptionDesigner.getRequiredBundle(bundleComponent, bundleProject);
- }
-
+ }
+
return new ArrayList<ReferencedOSGIElement>();
}
public String getName(Object bundleProject) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
return workspaceBundleDescriptionDesigner.getName(bundleProject);
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
return loadedBundleDescriptionDesigner.getName(bundleProject);
}
- else if(bundleProject instanceof IFeatureModel){
+ else if (bundleProject instanceof IFeatureModel) {
return featureDescriptionDesigner.getName(bundleProject);
}
return null;
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 4bac7d338b1..db5782e062a 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -29,53 +29,54 @@ import org.osgi.framework.Bundle;
@SuppressWarnings("restriction")
public class BundleLabelProvider extends LabelProvider {
BundleDesignerRegistry bundleDesignerRegistry;
-
+
/**
- *
+ *
* Constructor.
*
*/
public BundleLabelProvider() {
- bundleDesignerRegistry= new BundleDesignerRegistry();
+ bundleDesignerRegistry = new BundleDesignerRegistry();
}
-
+
+ @Override
public Image getImage(Object bundleProject) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
return getImage("img/bundle_pj.gif");
}
- else if(bundleProject instanceof Bundle){
+ else if (bundleProject instanceof Bundle) {
return getImage("img/bundle_obj.gif");
}
- else if(bundleProject instanceof IFeatureModel){
+ else if (bundleProject instanceof IFeatureModel) {
return getImage("img/bundle_obj.gif");
}
-
- else if(bundleProject instanceof IPluginModelBase){
+
+ else if (bundleProject instanceof IPluginModelBase) {
return getImage("img/bundle_obj.gif");
}
-
+
return super.getImage(bundleProject);
}
-
+
@Override
public String getText(Object element) {
return bundleDesignerRegistry.getSymbolicName(element);
}
-
+
/**
* Returns an {@link org.eclipse.swt.graphics.Image} identified by its key.<BR>
* By default, it returns a default image. This image is the image placed in the directory <em>resources/icons/default.gif</em>
- *
+ *
* @param key
- * the key of the image
- *
+ * the key of the image
+ *
* @return the Image
*/
public static Image getImage(String key) {
ImageRegistry registry = org.eclipse.papyrus.adltool.Activator.getDefault().getImageRegistry();
Image image = registry.get(key);
- if(image == null) {
+ if (image == null) {
ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(org.eclipse.papyrus.adltool.Activator.PLUGIN_ID, key);
registry.put(key, desc);
image = registry.get(key);
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
index 9e9bb8610b2..d543b89405b 100644
--- 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
@@ -15,8 +15,8 @@ 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();
+ if (bundleProject instanceof IFeatureModel) {
+ return ((IFeatureModel) bundleProject).getFeature().getId();
}
return null;
}
@@ -26,7 +26,7 @@ public class FeatureDescriptionDesigner extends AbstractBundleDescriptionDesigne
}
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getRequiredBundle(org.eclipse.uml2.uml.Component, java.lang.Object)
*
* @param bundleComponent
@@ -34,31 +34,31 @@ public class FeatureDescriptionDesigner extends AbstractBundleDescriptionDesigne
* @return the list of required Bundle
*/
public ArrayList<ReferencedOSGIElement> getRequiredBundle(Component bundleComponent, Object bundleProject) {
- ArrayList<ReferencedOSGIElement> bundleListName=new ArrayList<ReferencedOSGIElement>();
- if( bundleProject instanceof IFeatureModel){
- IFeatureModel currentFeatureModel=(IFeatureModel)bundleProject;
- IFeatureImport[] imports=currentFeatureModel.getFeature().getImports();
- for(int i = 0; i < imports.length; i++) {
+ ArrayList<ReferencedOSGIElement> bundleListName = new ArrayList<ReferencedOSGIElement>();
+ if (bundleProject instanceof IFeatureModel) {
+ IFeatureModel currentFeatureModel = (IFeatureModel) bundleProject;
+ IFeatureImport[] imports = currentFeatureModel.getFeature().getImports();
+ for (int i = 0; i < imports.length; i++) {
- ReferencedOSGIElement newRefElement= new ReferencedOSGIElement(null,imports[i].getId());
- if( imports[i].getType()==1){
+ ReferencedOSGIElement newRefElement = new ReferencedOSGIElement(null, imports[i].getId());
+ if (imports[i].getType() == 1) {
newRefElement.setKindRef(ReferencedOSGIElement.FEATURE);
}
bundleListName.add(newRefElement);
}
}
- return bundleListName;
- }
+ return bundleListName;
+ }
- @Override
- public String getBundleValue(Object bundleProject, String key) {
- // TODO Auto-generated method stub
- return null;
- }
+ @Override
+ public String getBundleValue(Object bundleProject, String key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
- public String getName(Object bundleProject) {
- // TODO Auto-generated method stub
- return null;
- }
+ public String getName(Object bundleProject) {
+ // TODO Auto-generated method stub
+ return null;
}
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/IBundleDescriptionDesigner.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/IBundleDescriptionDesigner.java
index b7d7a9d41a2..09d7f163ee2 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/IBundleDescriptionDesigner.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/IBundleDescriptionDesigner.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -59,21 +59,26 @@ public interface IBundleDescriptionDesigner {
public final static String ECLIPSE_REGISTERBUDDY = "Eclipse-RegisterBuddy";
/**
- *
+ *
* @param bundleProject
* @param key
* @return the value that correspond to the key
*/
- public String getBundleValue(Object bundleProject, String key);
+ public String getBundleValue(Object bundleProject, String key);
/**
* fill properties of stereotypes from Meta-information of the JAVA bundle object
- * @param bundleComponent the UML representation of a bundle
- * @param bundleProject the JAVA bundle project
+ *
+ * @param bundleComponent
+ * the UML representation of a bundle
+ * @param bundleProject
+ * the JAVA bundle project
*/
public void fillPluginProperties(Component bundleComponent, Object bundleProject);
+
/**
* get the symbolic name from the JAVA object that represent the bundle
+ *
* @param bundleProject
* @return the symbolic name
*/
@@ -81,21 +86,29 @@ public interface IBundleDescriptionDesigner {
/**
* get the name from the JAVA object that represent the bundle
+ *
* @param bundleProject
- * @return the name
+ * @return the name
*/
public String getName(Object bundleProject);
/**
* create packages that are exported to other plugins
- * @param bundleComponent the UML representation of the bundle
- * @param bundleProject the bundle JAVA object
+ *
+ * @param bundleComponent
+ * the UML representation of the bundle
+ * @param bundleProject
+ * the bundle JAVA object
*/
public void fillExportedPackages(Component bundleComponent, Object bundleProject);
+
/**
* return the list of referenced OSGI element from a bundle
- * @param bundleComponent the UML component that represent the bundle
- * @param bundleProject the java class that represent the bundle
+ *
+ * @param bundleComponent
+ * the UML component that represent the bundle
+ * @param bundleProject
+ * the java class that represent the bundle
* @return the list of OSGI references
*/
public ArrayList<ReferencedOSGIElement> getRequiredBundle(Component bundleComponent, Object bundleProject);
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 16002bd0ea7..ab3a058244d 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -29,65 +29,67 @@ import org.osgi.framework.Constants;
import org.osgi.framework.VersionRange;
/**
- * this class is an implementation for Bundle element -JAVA object of loaded bundle in the platform
+ * this class is an implementation for Bundle element -JAVA object of loaded bundle in the platform
*
*/
public class LoadedBundleDescriptionDesigner extends AbstractBundleDescriptionDesigner {
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.AbstractBundleDescriptionDesigner#getBundleValue(java.lang.Object, java.lang.String)
*
* @param bundleProject
* @param key
* @return the value that correspond to the key
*/
+ @Override
public String getBundleValue(Object bundleProject, String key) {
- if(bundleProject instanceof Bundle){
- return ((Bundle)bundleProject).getHeaders().get(key);
+ if (bundleProject instanceof Bundle) {
+ return ((Bundle) bundleProject).getHeaders().get(key);
}
return null;
}
+
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#fillExportedPackages(org.eclipse.uml2.uml.Component, java.lang.Object)
*
* @param bundleComponent
* @param bundleProject
*/
- public void fillExportedPackages(Component bundleComponent, Object bundleProject ) {
- if(bundleProject instanceof Bundle){
- ArrayList<EObject> exportedPackages= new ArrayList<EObject>();
- String exportPackageString=getBundleValue( bundleProject, Constants.EXPORT_PACKAGE);
+ public void fillExportedPackages(Component bundleComponent, Object bundleProject) {
+ if (bundleProject instanceof Bundle) {
+ ArrayList<EObject> exportedPackages = new ArrayList<EObject>();
+ String exportPackageString = getBundleValue(bundleProject, Constants.EXPORT_PACKAGE);
try {
- ManifestElement[] manisfests=ManifestElement.parseHeader(Constants.EXPORT_PACKAGE, exportPackageString);
- if(manisfests!=null){
- for(int i = 0; i < manisfests.length; i++) {
- ReferencedOSGIElement newRefElement= new ReferencedOSGIElement(null,manisfests[i].getValue());
- Package UMLPackage=UMLFactory.eINSTANCE.createPackage();
+ ManifestElement[] manisfests = ManifestElement.parseHeader(Constants.EXPORT_PACKAGE, exportPackageString);
+ if (manisfests != null) {
+ for (int i = 0; i < manisfests.length; i++) {
+ ReferencedOSGIElement newRefElement = new ReferencedOSGIElement(null, manisfests[i].getValue());
+ Package UMLPackage = UMLFactory.eINSTANCE.createPackage();
UMLPackage.setName(manisfests[i].getValue());
bundleComponent.getPackagedElements().add(UMLPackage);
- 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"));
- boolean value=Boolean.parseBoolean(booleanString);
- UMLPackage.setValue(exportedPackageStereotype, IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_ISINTERNAL_ATT,value);
+ 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"));
+ boolean value = Boolean.parseBoolean(booleanString);
+ UMLPackage.setValue(exportedPackageStereotype, IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_ISINTERNAL_ATT, value);
}
- if((manisfests[i].getDirective("x-friends"))!=null){
- //TODO: xfriends
+ if ((manisfests[i].getDirective("x-friends")) != null) {
+ // TODO: xfriends
}
- if( manisfests[i].getAttribute("version")!=null){
- VersionRange version= new VersionRange( manisfests[i].getAttribute("version"));
+ if (manisfests[i].getAttribute("version") != null) {
+ VersionRange version = new VersionRange(manisfests[i].getAttribute("version"));
newRefElement.setVersion(version);
UMLPackage.setValue(exportedPackageStereotype, IOSGIStereotype.VERSIONRANGE_ATLEAST_ATT, version.toString());
}
exportedPackages.add(UMLPackage.getStereotypeApplication(exportedPackageStereotype));
}
- Stereotype pluginStereotype=bundleComponent.getAppliedStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
+ Stereotype pluginStereotype = bundleComponent.getAppliedStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_EXPORTPACKAGE_ATT, exportedPackages);
}
} catch (BundleException e) {
@@ -95,8 +97,9 @@ public class LoadedBundleDescriptionDesigner extends AbstractBundleDescriptionDe
}
}
}
+
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getRequiredBundle(org.eclipse.uml2.uml.Component, java.lang.Object)
*
* @param bundleComponent
@@ -104,18 +107,18 @@ public class LoadedBundleDescriptionDesigner extends AbstractBundleDescriptionDe
* @return the list of required bundle
*/
public ArrayList<ReferencedOSGIElement> getRequiredBundle(Component bundleComponent, Object bundleProject) {
- ArrayList<ReferencedOSGIElement> bundleListName=new ArrayList<ReferencedOSGIElement>();
- String requiredbundleString=getBundleValue( bundleProject, Constants.REQUIRE_BUNDLE);
+ ArrayList<ReferencedOSGIElement> bundleListName = new ArrayList<ReferencedOSGIElement>();
+ String requiredbundleString = getBundleValue(bundleProject, Constants.REQUIRE_BUNDLE);
try {
- ManifestElement[] manisfests=ManifestElement.parseHeader(Constants.REQUIRE_BUNDLE, requiredbundleString);
- if(manisfests!=null){
- for(int i = 0; i < manisfests.length; i++) {
- ReferencedOSGIElement newRefElement= new ReferencedOSGIElement(null,manisfests[i].getValue());
- if( manisfests[i].getAttribute(Constants.BUNDLE_VERSION.toLowerCase())!=null){
- VersionRange version= new VersionRange( manisfests[i].getAttribute(Constants.BUNDLE_VERSION.toLowerCase()));
+ ManifestElement[] manisfests = ManifestElement.parseHeader(Constants.REQUIRE_BUNDLE, requiredbundleString);
+ if (manisfests != null) {
+ for (int i = 0; i < manisfests.length; i++) {
+ ReferencedOSGIElement newRefElement = new ReferencedOSGIElement(null, manisfests[i].getValue());
+ if (manisfests[i].getAttribute(Constants.BUNDLE_VERSION.toLowerCase()) != null) {
+ VersionRange version = new VersionRange(manisfests[i].getAttribute(Constants.BUNDLE_VERSION.toLowerCase()));
newRefElement.setVersion(version);
- if (manisfests[i].getDirective(Constants.RESOLUTION_DIRECTIVE)!=null){
- if( (manisfests[i].getDirective(Constants.RESOLUTION_DIRECTIVE).equals(Constants.RESOLUTION_OPTIONAL))){
+ if (manisfests[i].getDirective(Constants.RESOLUTION_DIRECTIVE) != null) {
+ if ((manisfests[i].getDirective(Constants.RESOLUTION_DIRECTIVE).equals(Constants.RESOLUTION_OPTIONAL))) {
newRefElement.setOptional(true);
}
}
@@ -130,8 +133,9 @@ public class LoadedBundleDescriptionDesigner extends AbstractBundleDescriptionDe
return bundleListName;
}
+
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.IBundleDescriptionDesigner#getSymbolicName(java.lang.Object)
*
* @param bundleProject
@@ -139,12 +143,13 @@ public class LoadedBundleDescriptionDesigner extends AbstractBundleDescriptionDe
*/
public String getSymbolicName(Object bundleProject) {
- if(bundleProject instanceof Bundle){
- return ((Bundle)bundleProject).getSymbolicName();
+ if (bundleProject instanceof Bundle) {
+ return ((Bundle) bundleProject).getSymbolicName();
}
return null;
}
+
public String getName(Object bundleProject) {
return this.getBundleValue(bundleProject, org.osgi.framework.Constants.BUNDLE_NAME);
}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/ReferencedOSGIElement.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/ReferencedOSGIElement.java
index ee16f709aae..995d622acf1 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/ReferencedOSGIElement.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/bundle/ReferencedOSGIElement.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -17,18 +17,19 @@ import org.osgi.framework.VersionRange;
/**
* this class is an abstraction of a reference to an element
- * it name + version
+ * it name + version
*
*/
public class ReferencedOSGIElement {
- private VersionRange version=null;
- private String symbolicName= null;
- private String kindRef="";
- private boolean optional= false;
+ private VersionRange version = null;
+ private String symbolicName = null;
+ private String kindRef = "";
+ private boolean optional = false;
/**
* a reference may be optional
+ *
* @return true if the the reference is optional
*/
public boolean isOptional() {
@@ -37,7 +38,9 @@ public class ReferencedOSGIElement {
/**
* set the reference as optional
- * @param optional a boolean
+ *
+ * @param optional
+ * a boolean
*/
public void setOptional(boolean optional) {
@@ -55,19 +58,22 @@ public class ReferencedOSGIElement {
/**
* set the model ref as dependency to a feature or plug-in
- * @param kindRef a string see FEATURE ou PLUGIN constant
+ *
+ * @param kindRef
+ * a string see FEATURE ou PLUGIN constant
*/
public void setKindRef(String kindRef) {
this.kindRef = kindRef;
}
+
/**
* the type of ref for a feature
*/
- public static String FEATURE="feature";
+ public static String FEATURE = "feature";
/**
* the type of ref for a plug-in
*/
- public static String PLUGIN="plugin";
+ public static String PLUGIN = "plugin";
/**
* Constructor.
@@ -79,7 +85,7 @@ public class ReferencedOSGIElement {
super();
this.version = version;
this.symbolicName = symbolicName;
- this.kindRef=PLUGIN;
+ this.kindRef = PLUGIN;
}
@@ -91,7 +97,8 @@ public class ReferencedOSGIElement {
}
/**
- * @param version the version to set
+ * @param version
+ * the version to set
*/
public void setVersion(VersionRange version) {
this.version = version;
@@ -105,7 +112,8 @@ public class ReferencedOSGIElement {
}
/**
- * @param symbolicName the symbolicName to set
+ * @param symbolicName
+ * the symbolicName to set
*/
public void setSymbolicName(String symbolicName) {
this.symbolicName = symbolicName;
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 f6f29ae8fa1..960a0b72a96 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -38,22 +38,23 @@ import org.osgi.framework.Constants;
public class WorkspaceBundleDescriptionDesigner extends AbstractBundleDescriptionDesigner {
/**
- *
+ *
* @see org.eclipse.papyrus.adltool.designer.bundle.AbstractBundleDescriptionDesigner#getBundleValue(java.lang.Object, java.lang.String)
*
* @param bundleProject
* @param key
* @return the value that corresponds to the key
*/
- public String getBundleValue(Object bundleProject, String key){
- String valueFromDescription=null;
- if(bundleProject instanceof IBundleProjectDescription){
- PropertyResourceBundle propertyResourceBundle=getNLSFilesFor((IBundleProjectDescription)bundleProject);
- valueFromDescription=((IBundleProjectDescription)bundleProject).getHeader(key);
- if( propertyResourceBundle!=null&&valueFromDescription!=null ){
+ @Override
+ public String getBundleValue(Object bundleProject, String key) {
+ String valueFromDescription = null;
+ if (bundleProject instanceof IBundleProjectDescription) {
+ PropertyResourceBundle propertyResourceBundle = getNLSFilesFor((IBundleProjectDescription) bundleProject);
+ valueFromDescription = ((IBundleProjectDescription) bundleProject).getHeader(key);
+ if (propertyResourceBundle != null && valueFromDescription != null) {
if (valueFromDescription.startsWith("%") && (valueFromDescription.length() > 1)) { //$NON-NLS-1$
String propertiesKey = valueFromDescription.substring(1);
- valueFromDescription = propertyResourceBundle.getString(propertiesKey);
+ valueFromDescription = propertyResourceBundle.getString(propertiesKey);
}
}
}
@@ -62,20 +63,22 @@ public class WorkspaceBundleDescriptionDesigner extends AbstractBundleDescriptio
/**
* get properties files
- * @param bundle the bundle description
+ *
+ * @param bundle
+ * the bundle description
* @return the bundle properties if it exist form Bundle description
*/
- protected static PropertyResourceBundle getNLSFilesFor(IBundleProjectDescription bundle) {
- PropertyResourceBundle bundleproperties=null;
+ protected static PropertyResourceBundle getNLSFilesFor(IBundleProjectDescription bundle) {
+ PropertyResourceBundle bundleproperties = null;
// get the base localization path from the target
- String localization = (String) bundle.getHeader(Constants.BUNDLE_LOCALIZATION);
- if (localization != null){
- // we do a simple check to make sure the default nls path exists in the target;
+ String localization = bundle.getHeader(Constants.BUNDLE_LOCALIZATION);
+ if (localization != null) {
+ // we do a simple check to make sure the default nls path exists in the target;
// this is for performance reasons, but I'm not sure it is valid because a target could ship without the default nls properties file but this seems very unlikely
- IFile file=bundle.getProject().getFile(localization + ".properties");
- if( file!=null){
+ IFile file = bundle.getProject().getFile(localization + ".properties");
+ if (file != null) {
try {
- bundleproperties= new PropertyResourceBundle(file.getContents());
+ bundleproperties = new PropertyResourceBundle(file.getContents());
} catch (IOException e) {
e.printStackTrace();
} catch (CoreException e) {
@@ -85,46 +88,50 @@ public class WorkspaceBundleDescriptionDesigner extends AbstractBundleDescriptio
}
return bundleproperties;
}
+
/**
* create package from exported Packages
- * @param bundleComponent the description of the bundle
+ *
+ * @param bundleComponent
+ * the description of the bundle
* @param bundleProject
*/
- public void fillExportedPackages(Component bundleComponent, Object bundleProject ) {
- if(bundleProject instanceof IBundleProjectDescription){
- IPackageExportDescription[] packageExportDescription=((IBundleProjectDescription)bundleProject).getPackageExports();
- if(packageExportDescription!=null){
- ArrayList<EObject> exportedPackages= new ArrayList<EObject>();
- for(int i = 0; i < packageExportDescription.length; i++) {
- Package UMLPackage=UMLFactory.eINSTANCE.createPackage();
+ public void fillExportedPackages(Component bundleComponent, Object bundleProject) {
+ if (bundleProject instanceof IBundleProjectDescription) {
+ IPackageExportDescription[] packageExportDescription = ((IBundleProjectDescription) bundleProject).getPackageExports();
+ if (packageExportDescription != null) {
+ ArrayList<EObject> exportedPackages = new ArrayList<EObject>();
+ for (int i = 0; i < packageExportDescription.length; i++) {
+ Package UMLPackage = UMLFactory.eINSTANCE.createPackage();
UMLPackage.setName(packageExportDescription[i].getName());
bundleComponent.getPackagedElements().add(UMLPackage);
- Stereotype exportedPackageStereotype=UMLPackage.getApplicableStereotype(IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_STEREOTYPE);
+ Stereotype exportedPackageStereotype = UMLPackage.getApplicableStereotype(IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_STEREOTYPE);
UMLPackage.applyStereotype(exportedPackageStereotype);
UMLPackage.setValue(exportedPackageStereotype, IADL4ECLIPSE_Stereotype.ECLIPSEEXPORTEDPACKAGE_ISINTERNAL_ATT, !packageExportDescription[i].isApi());
- if(packageExportDescription[i].getVersion()!=null){
+ if (packageExportDescription[i].getVersion() != null) {
UMLPackage.setValue(exportedPackageStereotype, IOSGIStereotype.VERSIONRANGE_ATLEAST_ATT, packageExportDescription[i].getVersion().toString());
}
exportedPackages.add(UMLPackage.getStereotypeApplication(exportedPackageStereotype));
}
- Stereotype pluginStereotype=bundleComponent.getAppliedStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
+ Stereotype pluginStereotype = bundleComponent.getAppliedStereotype(IADL4ECLIPSE_Stereotype.PLUGIN_STEREOTYPE);
bundleComponent.setValue(pluginStereotype, IOSGIStereotype.BUNDLE_EXPORTPACKAGE_ATT, exportedPackages);
}
}
}
+
/**
- *
+ *
* {@inheritDoc}
*/
public ArrayList<ReferencedOSGIElement> getRequiredBundle(Component bundleComponent, Object bundleProject) {
- ArrayList<ReferencedOSGIElement> bundleRefList=new ArrayList<ReferencedOSGIElement>();
- if(bundleProject instanceof IBundleProjectDescription){
- IRequiredBundleDescription[] requiredBundleDescriptions=((IBundleProjectDescription)bundleProject).getRequiredBundles();
- if(requiredBundleDescriptions==null){
+ ArrayList<ReferencedOSGIElement> bundleRefList = new ArrayList<ReferencedOSGIElement>();
+ if (bundleProject instanceof IBundleProjectDescription) {
+ IRequiredBundleDescription[] requiredBundleDescriptions = ((IBundleProjectDescription) bundleProject).getRequiredBundles();
+ if (requiredBundleDescriptions == null) {
return bundleRefList;
}
- for(int i = 0; i < requiredBundleDescriptions.length; i++) {
- ReferencedOSGIElement newrefElement= new ReferencedOSGIElement(null,requiredBundleDescriptions[i].getName());
+ for (int i = 0; i < requiredBundleDescriptions.length; i++) {
+ ReferencedOSGIElement newrefElement = new ReferencedOSGIElement(null, requiredBundleDescriptions[i].getName());
bundleRefList.add(newrefElement);
}
}
@@ -132,18 +139,18 @@ public class WorkspaceBundleDescriptionDesigner extends AbstractBundleDescriptio
}
/**
- *
+ *
* {@inheritDoc}
*/
public String getSymbolicName(Object bundleProject) {
- if(bundleProject instanceof IBundleProjectDescription){
+ if (bundleProject instanceof IBundleProjectDescription) {
return ((IBundleProjectDescription) bundleProject).getSymbolicName();
}
return null;
}
/**
- *
+ *
* {@inheritDoc}
*/
public String getName(Object bundleProject) {
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java
index ab3ec19d96f..5aa30111128 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java
@@ -1,8 +1,7 @@
-
/*****************************************************************************
* 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
@@ -32,32 +31,33 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
/**
- * aGUI in order to select a set of bundle from a list
+ * aGUI in order to select a set of bundle from a list
*
*/
public class BundleSelectionPage extends WizardPage {
/**
- * the graphical tree
+ * the graphical tree
*/
protected Tree elementTree;
protected ArrayList<?> bundleList;
protected ArrayList<Object> selectedBundleList;
- protected BundleLabelProvider bundleLabelProvider= new BundleLabelProvider();
+ protected BundleLabelProvider bundleLabelProvider = new BundleLabelProvider();
private Composite comp;
/**
- *
+ *
* Constructor.
*
- * @param bundleList the list of bundle to display
+ * @param bundleList
+ * the list of bundle to display
*/
public BundleSelectionPage(ArrayList<?> bundleList) {
super("BundleSelection");
setTitle("Bundle Selection");
setDescription("Select bundles to create the architecture model.");
- this.bundleList=bundleList;
- this.selectedBundleList= new ArrayList<Object>();
+ this.bundleList = bundleList;
+ this.selectedBundleList = new ArrayList<Object>();
}
public void createControl(Composite parent) {
@@ -88,15 +88,15 @@ public class BundleSelectionPage extends WizardPage {
deselectAll();
}
-
+
});
-
-
- if(bundleList != null) {
+
+
+ if (bundleList != null) {
Iterator<?> it = bundleList.iterator();
- while(it.hasNext()) {
+ while (it.hasNext()) {
Object current = it.next();
createTreeItem(current);
}
@@ -105,17 +105,17 @@ public class BundleSelectionPage extends WizardPage {
elementTree.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
- if(event.detail == SWT.CHECK) {
- if(selectedBundleList.contains(event.item.getData())) {
+ if (event.detail == SWT.CHECK) {
+ if (selectedBundleList.contains(event.item.getData())) {
selectedBundleList.remove(event.item.getData());
} else {
selectedBundleList.add(event.item.getData());
}
- if(selectedBundleList.size()>0){
+ if (selectedBundleList.size() > 0) {
setPageComplete(true);
}
- else{
+ else {
setPageComplete(false);
}
}
@@ -131,25 +131,27 @@ public class BundleSelectionPage extends WizardPage {
protected void selectAll() {
selectedBundleList.clear();
- for(int i = 0; i < elementTree.getItems().length; i++) {
+ for (int i = 0; i < elementTree.getItems().length; i++) {
elementTree.getItems()[i].setChecked(true);
selectedBundleList.add(elementTree.getItems()[i].getData());
-
+
}
setPageComplete(true);
-
+
}
+
protected void deselectAll() {
- for(int i = 0; i < elementTree.getItems().length; i++) {
+ for (int i = 0; i < elementTree.getItems().length; i++) {
elementTree.getItems()[i].setChecked(false);
}
-
- selectedBundleList.clear();
- setPageComplete(false);
+
+ selectedBundleList.clear();
+ setPageComplete(false);
}
/**
* create an item that represent the bundle
+ *
* @param _package
*/
private void createTreeItem(Object bundle) {
@@ -161,11 +163,11 @@ public class BundleSelectionPage extends WizardPage {
/**
* Returns the elements to import.
- *
+ *
* @return the set of selected bundle
*/
public ArrayList<Object> getResult() {
return selectedBundleList;
}
-}
+}
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
index 3fab9177cba..4c837815145 100644
--- 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
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -20,12 +20,14 @@ import org.eclipse.papyrus.adltool.designer.ArchitectureSnapshotDesigner;
/**
* this wizard is used to display feature from workspace and the platform
- *@deprecated
+ *
+ * @deprecated
*/
+@Deprecated
public class FeatureArchitectureWizard extends PluginArchitectureWizard {
/**
- *
+ *
* Constructor.
*
* @param onlyWorkspace
@@ -36,11 +38,11 @@ public class FeatureArchitectureWizard extends PluginArchitectureWizard {
@Override
public void addPages() {
- ArrayList<Object> bundleList= new ArrayList<Object>();
- if(onlyWorkspace){
+ ArrayList<Object> bundleList = new ArrayList<Object>();
+ if (onlyWorkspace) {
bundleList.addAll(ArchitectureSnapshotDesigner.getWorkspaceFeature());
}
- else{
+ else {
bundleList.addAll(ArchitectureSnapshotDesigner.getFeature());
}
bundleSelectionPage = new BundleSelectionPage(bundleList);
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java
index cdb355fb92c..916094a0031 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/PluginArchitectureWizard.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -25,16 +25,18 @@ import org.eclipse.ui.IWorkbench;
/**
* this wizard is used to display plugin from workspace and the platform
- *@deprecated
+ *
+ * @deprecated
*/
-public class PluginArchitectureWizard extends Wizard implements IImportWizard{
+@Deprecated
+public class PluginArchitectureWizard extends Wizard implements IImportWizard {
protected BundleSelectionPage bundleSelectionPage;
- protected boolean onlyWorkspace=true;
+ protected boolean onlyWorkspace = true;
/**
- *
+ *
* Constructor.
*
* @param onlyWorkspace
@@ -42,15 +44,15 @@ public class PluginArchitectureWizard extends Wizard implements IImportWizard{
public PluginArchitectureWizard(boolean onlyWorkspace) {
super();
setNeedsProgressMonitor(true);
- this.onlyWorkspace=onlyWorkspace;
+ this.onlyWorkspace = onlyWorkspace;
}
@Override
public void addPages() {
- ArrayList<Object> bundleList= new ArrayList<Object>();
+ ArrayList<Object> bundleList = new ArrayList<Object>();
bundleList.addAll(ArchitectureSnapshotDesigner.getWorkspaceBundle());
- //do not look for loaded plugin in the case of a simple research
- if(!onlyWorkspace){
+ // do not look for loaded plugin in the case of a simple research
+ if (!onlyWorkspace) {
bundleList.addAll(ArchitectureSnapshotDesigner.getLoadedBundles());
}
bundleSelectionPage = new BundleSelectionPage(bundleList);
@@ -58,15 +60,16 @@ public class PluginArchitectureWizard extends Wizard implements IImportWizard{
}
/**
- *
+ *
* @return the list of selected bundle
*/
- public ArrayList<Object> getSelectedBundle(){
+ public ArrayList<Object> getSelectedBundle() {
return bundleSelectionPage.getResult();
}
+
@Override
public boolean performFinish() {
- if(bundleSelectionPage.getResult().size()>0){
+ if (bundleSelectionPage.getResult().size() > 0) {
return true;
}
@@ -75,6 +78,6 @@ public class PluginArchitectureWizard extends Wizard implements IImportWizard{
public void init(IWorkbench workbench, IStructuredSelection selection) {
// TODO Auto-generated method stub
-
+
}
-}
+}
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/Activator.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/Activator.java
index f6833806e9b..a45705e375b 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/Activator.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/Activator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -21,12 +21,12 @@ import org.osgi.framework.BundleContext;
*/
public class Activator extends AbstractUIPlugin {
- /** The plug-in ID**/
+ /** The plug-in ID **/
public static final String PLUGIN_ID = "org.eclipse.papyrus.osgi.profile"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -35,8 +35,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -44,8 +46,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/IOSGIStereotype.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/IOSGIStereotype.java
index f6542d044e1..bdd3c6f056c 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/IOSGIStereotype.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/IOSGIStereotype.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -18,88 +18,88 @@ package org.eclipse.papyrus.osgi.profile;
*
*/
public interface IOSGIStereotype {
-/** Qualified name of the Bundle */
-public static final String BUNDLE_ = "OSGI::ModuleLayer::Bundle";
-/** name of property hasLazyActivationPolicy of the stereotype Bundle */
-public static final String BUNDLE_HASLAZYACTIVATIONPOLICY_ATT = "hasLazyActivationPolicy";
-/** name of property activator of the stereotype Bundle */
-public static final String BUNDLE_ACTIVATOR_ATT = "activator";
-/** name of property category of the stereotype Bundle */
-public static final String BUNDLE_CATEGORY_ATT = "category";
-/** name of property classPath of the stereotype Bundle */
-public static final String BUNDLE_CLASSPATH_ATT = "classPath";
-/** name of property contactAddress of the stereotype Bundle */
-public static final String BUNDLE_CONTACTADDRESS_ATT = "contactAddress";
-/** name of property copyright of the stereotype Bundle */
-public static final String BUNDLE_COPYRIGHT_ATT = "copyright";
-/** name of property description of the stereotype Bundle */
-public static final String BUNDLE_DESCRIPTION_ATT = "description";
-/** name of property docURL of the stereotype Bundle */
-public static final String BUNDLE_DOCURL_ATT = "docURL";
-/** name of property icon of the stereotype Bundle */
-public static final String BUNDLE_ICON_ATT = "icon";
-/** name of property license of the stereotype Bundle */
-public static final String BUNDLE_LICENSE_ATT = "license";
-/** name of property localization of the stereotype Bundle */
-public static final String BUNDLE_LOCALIZATION_ATT = "localization";
-/** name of property manifestVersion of the stereotype Bundle */
-public static final String BUNDLE_MANIFESTVERSION_ATT = "manifestVersion";
-/** name of property nativeCode of the stereotype Bundle */
-public static final String BUNDLE_NATIVECODE_ATT = "nativeCode";
-/** name of property requiredExecutionEnvironment of the stereotype Bundle */
-public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT_ATT = "requiredExecutionEnvironment";
-/** name of property symbolicName of the stereotype Bundle */
-public static final String BUNDLE_SYMBOLICNAME_ATT = "symbolicName";
-/** name of property isSingleton of the stereotype Bundle */
-public static final String BUNDLE_ISSINGLETON_ATT = "isSingleton";
-/** name of property updateLocation of the stereotype Bundle */
-public static final String BUNDLE_UPDATELOCATION_ATT = "updateLocation";
-/** name of property vendor of the stereotype Bundle */
-public static final String BUNDLE_VENDOR_ATT = "vendor";
-/** name of property version of the stereotype Bundle */
-public static final String BUNDLE_VERSION_ATT = "version";
-/** name of property dynamicImportPackage of the stereotype Bundle */
-public static final String BUNDLE_DYNAMICIMPORTPACKAGE_ATT = "dynamicImportPackage";
-/** name of property exportPackage of the stereotype Bundle */
-public static final String BUNDLE_EXPORTPACKAGE_ATT = "exportPackage";
-/** name of property fragmentHost of the stereotype Bundle */
-public static final String BUNDLE_FRAGMENTHOST_ATT = "fragmentHost";
-/** name of property importPackage of the stereotype Bundle */
-public static final String BUNDLE_IMPORTPACKAGE_ATT = "importPackage";
-/** name of property requireBundle of the stereotype Bundle */
-public static final String BUNDLE_REQUIREBUNDLE_ATT = "requireBundle";
-/** name of property base_Component of the stereotype Bundle */
-public static final String BUNDLE_BASE_COMPONENT_ATT = "base_Component";
-/** name of property name of the stereotype Bundle */
-public static final String BUNDLE_NAME_ATT = "name";
-/** name of literal osgi of the Enumeration Bundle-Category */
-public static final String BUNDLE_CATEGORY_OSGI_ENUM = "osgi";
-/** name of literal test of the Enumeration Bundle-Category */
-public static final String BUNDLE_CATEGORY_TEST_ENUM = "test";
-/** name of literal nursery of the Enumeration Bundle-Category */
-public static final String BUNDLE_CATEGORY_NURSERY_ENUM = "nursery";
-/** Qualified name of the VersionRange */
-public static final String VERSIONRANGE_ = "OSGI::ModuleLayer::VersionRange";
-/** name of property floor of the stereotype VersionRange */
-public static final String VERSIONRANGE_FLOOR_ATT = "floor";
-/** name of property ceiling of the stereotype VersionRange */
-public static final String VERSIONRANGE_CEILING_ATT = "ceiling";
-/** name of property atleast of the stereotype VersionRange */
-public static final String VERSIONRANGE_ATLEAST_ATT = "atleast";
-/** name of property includefloor of the stereotype VersionRange */
-public static final String VERSIONRANGE_INCLUDEFLOOR_ATT = "includefloor";
-/** name of property includeCeiling of the stereotype VersionRange */
-public static final String VERSIONRANGE_INCLUDECEILING_ATT = "includeCeiling";
-/** Qualified name of the BundleReference */
-public static final String BUNDLEREFERENCE_ = "OSGI::ModuleLayer::BundleReference";
-/** name of property base_Dependency of the stereotype BundleReference */
-public static final String BUNDLEREFERENCE_BASE_DEPENDENCY_ATT = "base_Dependency";
-/** Qualified name of the PackageReference */
-public static final String PACKAGEREFERENCE_ = "OSGI::ModuleLayer::PackageReference";
-/** name of property base_Dependency of the stereotype PackageReference */
-public static final String PACKAGEREFERENCE_BASE_DEPENDENCY_ATT = "base_Dependency";
-/** Qualified name of the ExportedPackage */
-public static final String EXPORTEDPACKAGE_ = "OSGI::ModuleLayer::ExportedPackage";
-/** name of property base_Package of the stereotype ExportedPackage */
-public static final String EXPORTEDPACKAGE_BASE_PACKAGE_ATT = "base_Package";
+ /** Qualified name of the Bundle */
+ public static final String BUNDLE_ = "OSGI::ModuleLayer::Bundle";
+ /** name of property hasLazyActivationPolicy of the stereotype Bundle */
+ public static final String BUNDLE_HASLAZYACTIVATIONPOLICY_ATT = "hasLazyActivationPolicy";
+ /** name of property activator of the stereotype Bundle */
+ public static final String BUNDLE_ACTIVATOR_ATT = "activator";
+ /** name of property category of the stereotype Bundle */
+ public static final String BUNDLE_CATEGORY_ATT = "category";
+ /** name of property classPath of the stereotype Bundle */
+ public static final String BUNDLE_CLASSPATH_ATT = "classPath";
+ /** name of property contactAddress of the stereotype Bundle */
+ public static final String BUNDLE_CONTACTADDRESS_ATT = "contactAddress";
+ /** name of property copyright of the stereotype Bundle */
+ public static final String BUNDLE_COPYRIGHT_ATT = "copyright";
+ /** name of property description of the stereotype Bundle */
+ public static final String BUNDLE_DESCRIPTION_ATT = "description";
+ /** name of property docURL of the stereotype Bundle */
+ public static final String BUNDLE_DOCURL_ATT = "docURL";
+ /** name of property icon of the stereotype Bundle */
+ public static final String BUNDLE_ICON_ATT = "icon";
+ /** name of property license of the stereotype Bundle */
+ public static final String BUNDLE_LICENSE_ATT = "license";
+ /** name of property localization of the stereotype Bundle */
+ public static final String BUNDLE_LOCALIZATION_ATT = "localization";
+ /** name of property manifestVersion of the stereotype Bundle */
+ public static final String BUNDLE_MANIFESTVERSION_ATT = "manifestVersion";
+ /** name of property nativeCode of the stereotype Bundle */
+ public static final String BUNDLE_NATIVECODE_ATT = "nativeCode";
+ /** name of property requiredExecutionEnvironment of the stereotype Bundle */
+ public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT_ATT = "requiredExecutionEnvironment";
+ /** name of property symbolicName of the stereotype Bundle */
+ public static final String BUNDLE_SYMBOLICNAME_ATT = "symbolicName";
+ /** name of property isSingleton of the stereotype Bundle */
+ public static final String BUNDLE_ISSINGLETON_ATT = "isSingleton";
+ /** name of property updateLocation of the stereotype Bundle */
+ public static final String BUNDLE_UPDATELOCATION_ATT = "updateLocation";
+ /** name of property vendor of the stereotype Bundle */
+ public static final String BUNDLE_VENDOR_ATT = "vendor";
+ /** name of property version of the stereotype Bundle */
+ public static final String BUNDLE_VERSION_ATT = "version";
+ /** name of property dynamicImportPackage of the stereotype Bundle */
+ public static final String BUNDLE_DYNAMICIMPORTPACKAGE_ATT = "dynamicImportPackage";
+ /** name of property exportPackage of the stereotype Bundle */
+ public static final String BUNDLE_EXPORTPACKAGE_ATT = "exportPackage";
+ /** name of property fragmentHost of the stereotype Bundle */
+ public static final String BUNDLE_FRAGMENTHOST_ATT = "fragmentHost";
+ /** name of property importPackage of the stereotype Bundle */
+ public static final String BUNDLE_IMPORTPACKAGE_ATT = "importPackage";
+ /** name of property requireBundle of the stereotype Bundle */
+ public static final String BUNDLE_REQUIREBUNDLE_ATT = "requireBundle";
+ /** name of property base_Component of the stereotype Bundle */
+ public static final String BUNDLE_BASE_COMPONENT_ATT = "base_Component";
+ /** name of property name of the stereotype Bundle */
+ public static final String BUNDLE_NAME_ATT = "name";
+ /** name of literal osgi of the Enumeration Bundle-Category */
+ public static final String BUNDLE_CATEGORY_OSGI_ENUM = "osgi";
+ /** name of literal test of the Enumeration Bundle-Category */
+ public static final String BUNDLE_CATEGORY_TEST_ENUM = "test";
+ /** name of literal nursery of the Enumeration Bundle-Category */
+ public static final String BUNDLE_CATEGORY_NURSERY_ENUM = "nursery";
+ /** Qualified name of the VersionRange */
+ public static final String VERSIONRANGE_ = "OSGI::ModuleLayer::VersionRange";
+ /** name of property floor of the stereotype VersionRange */
+ public static final String VERSIONRANGE_FLOOR_ATT = "floor";
+ /** name of property ceiling of the stereotype VersionRange */
+ public static final String VERSIONRANGE_CEILING_ATT = "ceiling";
+ /** name of property atleast of the stereotype VersionRange */
+ public static final String VERSIONRANGE_ATLEAST_ATT = "atleast";
+ /** name of property includefloor of the stereotype VersionRange */
+ public static final String VERSIONRANGE_INCLUDEFLOOR_ATT = "includefloor";
+ /** name of property includeCeiling of the stereotype VersionRange */
+ public static final String VERSIONRANGE_INCLUDECEILING_ATT = "includeCeiling";
+ /** Qualified name of the BundleReference */
+ public static final String BUNDLEREFERENCE_ = "OSGI::ModuleLayer::BundleReference";
+ /** name of property base_Dependency of the stereotype BundleReference */
+ public static final String BUNDLEREFERENCE_BASE_DEPENDENCY_ATT = "base_Dependency";
+ /** Qualified name of the PackageReference */
+ public static final String PACKAGEREFERENCE_ = "OSGI::ModuleLayer::PackageReference";
+ /** name of property base_Dependency of the stereotype PackageReference */
+ public static final String PACKAGEREFERENCE_BASE_DEPENDENCY_ATT = "base_Dependency";
+ /** Qualified name of the ExportedPackage */
+ public static final String EXPORTEDPACKAGE_ = "OSGI::ModuleLayer::ExportedPackage";
+ /** name of property base_Package of the stereotype ExportedPackage */
+ public static final String EXPORTEDPACKAGE_BASE_PACKAGE_ATT = "base_Package";
}

Back to the top