Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2013-12-19 02:07:08 -0500
committerrschnekenbu2013-12-19 02:07:08 -0500
commit41b8c181041eca43c235094dd4557771ae0a66ae (patch)
treed5ad85f116bf9edbd03dda724b8b2d6f61698f8d
parentaa460bfa7043f89fce441e07aea9201e2d81ea15 (diff)
downloadorg.eclipse.papyrus-41b8c181041eca43c235094dd4557771ae0a66ae.tar.gz
org.eclipse.papyrus-41b8c181041eca43c235094dd4557771ae0a66ae.tar.xz
org.eclipse.papyrus-41b8c181041eca43c235094dd4557771ae0a66ae.zip
424402: [Core] Runtime deployment of the element types shall be possible
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424402
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties9
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gifbin0 -> 341 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gifbin0 -> 353 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml87
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java46
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java_bak107
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java269
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java151
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java152
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java116
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java_bak123
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di40
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation222
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml182
15 files changed, 903 insertions, 602 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties
index 70b011394ef..0fcee5a52b8 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties
@@ -1,7 +1,14 @@
#
#Mon Sep 12 09:29:52 CEST 2011
output..=bin/
-bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,schema/,about.html
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ schema/,\
+ about.html,\
+ icons/
jars.compile.order=.
src.includes = about.html
source.. = src-gen/,\
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif
new file mode 100644
index 00000000000..0b1be97b8cf
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif
new file mode 100644
index 00000000000..9b048d60532
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
index f7bde5ba19e..b7b0732ca16 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
@@ -3,7 +3,7 @@
<!--
<copyright>
- </copyright>
+ </copyright>r
$Id$
-->
@@ -14,21 +14,6 @@
<extension-point id="extendedTypeConfiguration" name="extended type configuration" schema="schema/extendedTypeConfiguration.exsd"/>
<extension-point id="invariantRule" name="Invariant Rule Extension Point" schema="schema/invariantRule.exsd"/>
<extension-point id="elementMatcherConfiguration" name="Element Macher Configuration" schema="schema/elementMatcherConfiguration.exsd"/>
-
-<!--
- <extension
- point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
- <metamodel
- nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
- <adviceBinding
- class="org.eclipse.papyrus.infra.extendedtypes.advices.ExtendedTypesOwnerAdvice"
- id="org.eclipse.papyrus.uml.advice.ExtendedTypesOwnerAdvice"
- inheritance="all"
- typeId="org.eclipse.papyrus.uml.Element">
- </adviceBinding>
- </metamodel>
- </extension>
- -->
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated AspectSemantic -->
@@ -152,4 +137,74 @@
type="invariantcontainerconfiguration"
class="org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util.InvariantContainerConfigurationResourceFactoryImpl"/>
</extension>
+
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <command
+ commandId="org.eclipse.papyrus.infra.extendedtypes.deploy"
+ icon="icons/configuration.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ <or>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="extendedtypes">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.infra.extendedtypes.undeploy"
+ icon="icons/configuration.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ <or>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="extendedtypes">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+</menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.papyrus.infra.extendedtypes.handler.DeployExtendedTypeSetConfigurationHandler"
+ id="org.eclipse.papyrus.infra.extendedtypes.deploy"
+ name="Deploy Extended Types Set configuration">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.infra.extendedtypes.handler.UndeployExtendedTypeSetConfigurationHandler"
+ id="org.eclipse.papyrus.infra.extendedtypes.undeploy"
+ name="Disable Extended Types Set configuration">
+ </command>
+ </extension>
</plugin>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java
index 762f42e18ae..16c22c03df3 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java
@@ -12,6 +12,13 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.extendedtypes;
+import java.lang.reflect.Field;
+
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
+
/**
* Utility class to manipulate {@link ExtendedElementTypeSet}.
@@ -26,4 +33,41 @@ public class ElementTypeSetUtils {
}
-}
+ /**
+ * Unloads a given {@link ExtendedElementTypeSet}
+ * @param elementTypeSet the element type set to unload
+ */
+ public static void unload(ExtendedElementTypeSet elementTypeSet) {
+
+ }
+
+ public static void resetRegistry() {
+ // FIXME save the current listeners, to add them back to the registry
+ IClientContext context;
+ try {
+ context = TypeContext.getContext();
+ } catch (ServiceException e1) {
+ Activator.log.error(e1);
+ return;
+ }
+ // impossibe to unregister element types...
+ // => destroy the singleton instance of the registry...
+ try {
+ Field declaredField = ElementTypeRegistry.class.getDeclaredField("INSTANCE");
+ declaredField.setAccessible(true);
+ declaredField.set(null, null);
+ } catch (SecurityException e1) {
+ e1.printStackTrace();
+ } catch (NoSuchFieldException e1) {
+ e1.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+
+ // create the registry
+ ElementTypeRegistry.getInstance();
+ }
+
+} \ No newline at end of file
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java_bak b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java_bak
deleted file mode 100644
index a91f9ecb899..00000000000
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java_bak
+++ /dev/null
@@ -1,107 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.extendedtypes;
-
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.papyrus.infra.extendedtypes.providers.ExtendedElementTypeActionService;
-import org.eclipse.papyrus.infra.extendedtypes.providers.ProviderNotFoundException;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-
-/**
- * Edit helper Advice for extended element types. This allows modification of the configure request executed right after the creation of the element
- */
-public class ExtendedEditHelperAdvice extends AbstractEditHelperAdvice {
-
- /**
- * Constructor.
- *
- */
- public ExtendedEditHelperAdvice() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean approveRequest(IEditCommandRequest request) {
- return super.approveRequest(request);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ICommand getBeforeEditContextCommand(GetEditContextRequest request) {
- return super.getBeforeEditContextCommand(request);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ICommand getBeforeCreateCommand(CreateElementRequest request) {
- return super.getBeforeCreateCommand(request);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ICommand getAfterConfigureCommand(ConfigureRequest request) {
- // for the list of post actions, returns a list of commands.
- // there should be a factory that delivers commands from the model
-
- CompositeCommand compositeCommand = new CompositeCommand("AfterConfigureCommand");
- IElementType type = request.getTypeToConfigure();
- if(type instanceof IExtendedHintedElementType) {
- IExtendedHintedElementType extendedHintedElementType = (IExtendedHintedElementType)type;
- ExtendedElementTypeConfiguration configuration = extendedHintedElementType.getConfiguration();
- for(PostActionConfiguration postActionConfiguration : configuration.getPostAction()) {
- ICommand command = null;
- try {
- command = ExtendedElementTypeActionService.getInstance().getICommand(request.getElementsToEdit(), postActionConfiguration);
- } catch (ProviderNotFoundException e) {
- Activator.log.error(e);
- }
- if(command != null) {
- compositeCommand.add(command);
- }
- }
-
- // return the composite command only if it is not empty
- if(!compositeCommand.isEmpty()) {
- return compositeCommand;
- }
- }
-
-
- // post-action. Here, this is null.
- return super.getAfterConfigureCommand(request);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ICommand getAfterCreateCommand(CreateElementRequest request) {
- return super.getAfterCreateCommand(request);
- }
-
-
-}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
index cacc88b2c66..136e02c80a1 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
@@ -21,6 +21,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.StringTokenizer;
@@ -33,36 +34,37 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.gmf.runtime.emf.type.core.ClientContextManager;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
import org.osgi.framework.Bundle;
-
/**
* Registry to manage load/unloaded {@link ExtendedElementTypeSet}.
*/
public class ExtendedElementTypeSetRegistry {
+ public static final String LOCAL_CONTRIBUTOR_ID = "local contribution";
+
/** private singleton instance */
private static ExtendedElementTypeSetRegistry registry;
-
+
/** list of retrieved extended type sets */
protected List<ExtendedElementTypeSet> extendedTypeSets = null;
/** unique resource set to load all extended types models */
protected ResourceSet extendedTypesResourceSet = null;
-
- protected List<ExtendedElementTypeSet> loadedExtendedElementTypeSets = null;
-
+
+ protected List<ExtendedElementTypeSet> loadedExtendedElementTypeSets = null;
+
protected Map<String, IExtendedElementTypeFactory<ElementTypeConfiguration>> configurationTypeToElementTypeFactory = null;
protected List<String> configurationTypeFactoryExceptions = null;
-
+
/**
* returns the singleton instance of this registry
*
@@ -75,7 +77,7 @@ public class ExtendedElementTypeSetRegistry {
}
return registry;
}
-
+
/**
* Inits the registry.
*/
@@ -84,23 +86,18 @@ public class ExtendedElementTypeSetRegistry {
extendedTypesResourceSet = null;
extendedTypeSets = null;
configurationTypeToElementTypeFactory = new HashMap<String, IExtendedElementTypeFactory<ElementTypeConfiguration>>();
-
// 1. creates the resource set
extendedTypesResourceSet = createResourceSet();
-
// 2. creates the list only when registry is acceded for the first time, (or on reload?)
extendedTypeSets = loadExtendedTypeSets();
-
-// // 3. loads each extended types sets, and creates types
-// for(ExtendedElementTypeSet extendedElementTypeSet : extendedTypeSets) {
-// loadExtendedElementTypeSet(extendedElementTypeSet);
-// }
}
- /**
- * Loads the specified extended element type set.
- * This does not take care to unload a similar set (a set with the same id) before loading. This should be handled before calling this method.
- * @param extendedElementTypeSet {@link ExtendedElementTypeSet} to load.
+ /**
+ * Loads the specified extended element type set.
+ * This does not take care to unload a similar set (a set with the same id) before loading. This should be handled before calling this method.
+ *
+ * @param extendedElementTypeSet
+ * {@link ExtendedElementTypeSet} to load.
*/
public void loadExtendedElementTypeSet(ExtendedElementTypeSet extendedElementTypeSet) {
IClientContext context;
@@ -110,29 +107,25 @@ public class ExtendedElementTypeSetRegistry {
Activator.log.error(e1);
return;
}
-
List<ElementTypeConfiguration> elementTypeConfigurations = extendedElementTypeSet.getElementType();
-
for(ElementTypeConfiguration configuration : elementTypeConfigurations) {
// load class associated to the configuration model => read extension point that defines this kind of configuration.
String configurationType = configuration.eClass().getInstanceTypeName();
// retrieve the factory for a given kind of configuration
- IExtendedElementTypeFactory factory = configurationTypeToElementTypeFactory.get(configurationType);
+ IExtendedElementTypeFactory<ElementTypeConfiguration> factory = configurationTypeToElementTypeFactory.get(configurationType);
// check factory is not on the exception table
-
-
- if(factory ==null && isNotInFactoryExceptionList(configurationType)) {
- Class<IExtendedElementTypeFactory> factoryClass = retrieveFactoryClassFromExtensionPoint(configurationType);
- if(factoryClass !=null) {
+ if(factory == null && isNotInFactoryExceptionList(configurationType)) {
+ Class<IExtendedElementTypeFactory<ElementTypeConfiguration>> factoryClass = retrieveFactoryClassFromExtensionPoint(configurationType);
+ if(factoryClass != null) {
try {
factory = factoryClass.newInstance();
} catch (InstantiationException e) {
- if(configurationTypeFactoryExceptions== null) {
+ if(configurationTypeFactoryExceptions == null) {
configurationTypeFactoryExceptions = new ArrayList<String>();
}
configurationTypeFactoryExceptions.add(configurationType);
} catch (IllegalAccessException e) {
- if(configurationTypeFactoryExceptions== null) {
+ if(configurationTypeFactoryExceptions == null) {
configurationTypeFactoryExceptions = new ArrayList<String>();
}
configurationTypeFactoryExceptions.add(configurationType);
@@ -140,8 +133,8 @@ public class ExtendedElementTypeSetRegistry {
configurationTypeToElementTypeFactory.put(configurationType, factory);
}
}
- if(factory != null) {
- ISpecializationType type = factory.createElementType(configuration);
+ if(factory != null) {
+ IExtendedHintedElementType type = factory.createElementType(configuration);
// register element Type
ElementTypeRegistry.getInstance().register(type);
context.bindId(type.getId());
@@ -149,39 +142,35 @@ public class ExtendedElementTypeSetRegistry {
// TODO handle errors here: no factory, impossible to create element type from configuration, impossible to register, etc.
}
}
-
-
-
+
/**
* check this configuration type has not already caused issues du
+ *
* @param configurationType
* @return
*/
protected boolean isNotInFactoryExceptionList(String configurationType) {
- if(configurationTypeFactoryExceptions ==null) {
+ if(configurationTypeFactoryExceptions == null) {
return true;
}
// this is not null, check the configuration type is not in the list
return !configurationTypeFactoryExceptions.contains(configurationType);
-
}
/**
* Returns the {@link IExtendedElementTypeFactory} class used to instantiate element type for the given configuration
+ *
* @return the {@link IExtendedElementTypeFactory} found or <code>null</code> if none was found
*/
@SuppressWarnings("unchecked")
- protected Class<IExtendedElementTypeFactory> retrieveFactoryClassFromExtensionPoint(String configurationType) {
+ protected Class<IExtendedElementTypeFactory<ElementTypeConfiguration>> retrieveFactoryClassFromExtensionPoint(String configurationType) {
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IExtendedTypeConfigurationExtensionPoint.EXTENSION_POINT_ID);
for(IConfigurationElement configurationElement : elements) {
-
String eCoreClassName = configurationElement.getAttribute(IExtendedTypeConfigurationExtensionPoint.CONFIGURATION_CLASS);
-
if(configurationType.equals(eCoreClassName)) {
-
// retrieve factory to load
String factoryClassName = configurationElement.getAttribute(IExtendedTypeConfigurationExtensionPoint.FACTORY_CLASS);
- return (Class<IExtendedElementTypeFactory>)loadClass(factoryClassName, configurationElement.getContributor().getName());
+ return (Class<IExtendedElementTypeFactory<ElementTypeConfiguration>>)loadClass(factoryClassName, configurationElement.getContributor().getName());
}
}
return null;
@@ -192,32 +181,58 @@ public class ExtendedElementTypeSetRegistry {
*/
protected List<ExtendedElementTypeSet> loadExtendedTypeSets() {
List<ExtendedElementTypeSet> extendedElementTypeSets = new ArrayList<ExtendedElementTypeSet>();
-
// 1. retrieve from the workspace
- // TODO implement retrieve from workspace. could be an activated/deactivated set of additions selected in the workspace
-
- // 2. retrieve from the platform.
- List<ExtendedElementTypeSet> registeredSets = loadExtendedTypeSetsFromPlatform();
+ Map<String, ExtendedElementTypeSet> localSets = loadExtendedTypeSetsFromWorkspace();
+ if(localSets != null && !localSets.isEmpty()) {
+ extendedElementTypeSets.addAll(localSets.values());
+ }
+
+ // 2. retrieve from the platform. If already in workspace (id), do not load the platform ones
+ Map<String, ExtendedElementTypeSet> registeredSets = loadExtendedTypeSetsFromPlatform(localSets.keySet());
if(registeredSets != null && !registeredSets.isEmpty()) {
- extendedElementTypeSets.addAll(registeredSets);
+ extendedElementTypeSets.addAll(registeredSets.values());
}
-
// load each extended element type set
for(ExtendedElementTypeSet extendedElementTypeSet : extendedElementTypeSets) {
loadExtendedElementTypeSet(extendedElementTypeSet);
}
-
return extendedElementTypeSets;
}
/**
+ * @return
+ */
+ protected Map<String, ExtendedElementTypeSet> loadExtendedTypeSetsFromWorkspace() {
+ Map<String, String> localFilesPath = ExtendedTypesPreferences.getLocalExtendedTypesDefinitions();
+ Map<String, ExtendedElementTypeSet> workspaceElementTypeSets = new HashMap<String, ExtendedElementTypeSet>();
+ if(localFilesPath != null && !localFilesPath.isEmpty()) {
+ for(Entry<String, String> idToPath : localFilesPath.entrySet()) {
+ String filePath = idToPath.getValue();
+ String id = idToPath.getKey();
+
+ URI localURI = URI.createPlatformResourceURI(filePath, true);
+ Resource resource = extendedTypesResourceSet.createResource(localURI);
+ try {
+ resource.load(null);
+ EObject content = resource.getContents().get(0);
+ if(content instanceof ExtendedElementTypeSet) {
+ workspaceElementTypeSets.put(id, (ExtendedElementTypeSet)content);
+ }
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+ }
+ return workspaceElementTypeSets;
+ }
+
+ /**
* Loads the extensions in the platform
*
* @return the list of extension registered in the platform
*/
- protected List<ExtendedElementTypeSet> loadExtendedTypeSetsFromPlatform() {
- List<ExtendedElementTypeSet> platformElementTypeSets = new ArrayList<ExtendedElementTypeSet>();
-
+ protected Map<String, ExtendedElementTypeSet> loadExtendedTypeSetsFromPlatform(Set<String> workspaceDefinitions) {
+ Map<String, ExtendedElementTypeSet> platformElementTypeSets = new HashMap<String, ExtendedElementTypeSet>();
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IExtendedElementTypeSetExtensionPoint.EXTENSION_POINT_ID);
// for each element, parses and retrieve the model file. then loads it and returns the root element
for(IConfigurationElement element : elements) {
@@ -231,14 +246,13 @@ public class ExtendedElementTypeSetRegistry {
Activator.log.debug("- id of the extended type set: " + extendedTypeSetId);
}
ExtendedElementTypeSet set = getExtendedElementTypeSet(extendedTypeSetId, modelPath, contributorID);
- if(set != null) {
- platformElementTypeSets.add(set);
+ if(set != null && !workspaceDefinitions.contains(extendedTypeSetId)) { // do not add if it is locally redefined
+ platformElementTypeSets.put(extendedTypeSetId, set);
}
}
-
return platformElementTypeSets;
}
-
+
/**
* <p>
* Loads the resource containing the extended element type set model.
@@ -262,7 +276,6 @@ public class ExtendedElementTypeSetRegistry {
if(filePath != null) {
getExtendedElementTypeSetInPluginStateArea(extendedTypesID);
}
-
// 2. no local redefinition. Load extended type set from plugin definition
Bundle bundle = Platform.getBundle(bundleId);
if(Platform.isFragment(bundle)) {
@@ -284,7 +297,7 @@ public class ExtendedElementTypeSetRegistry {
}
}
}
-
+
/**
* Retrieves the contribution in the plugin area
*
@@ -334,7 +347,7 @@ public class ExtendedElementTypeSetRegistry {
Activator.log.error("Impossible to cast the object into an ExtendedElementTypeSet: " + content, null);
return null;
}
-
+
/**
* Creates the resource set that contains all models for extended types
*
@@ -344,55 +357,54 @@ public class ExtendedElementTypeSetRegistry {
ResourceSet set = new ResourceSetImpl();
return set;
}
-
+
///////////////////////////////////////////////////////////////////////////
// loading resource
///////////////////////////////////////////////////////////////////////////
/** A map of classes that have been successfully loaded, keyed on the class name optionally prepended by the plugin ID, if specified. */
private static Map<String, WeakReference<Class<?>>> successLookupTable = new HashMap<String, WeakReference<Class<?>>>();
-
+
/** A map of classes that could not be loaded, keyed on the class name, optionally prepended by the plugin ID if specified. */
private static Set<String> failureLookupTable = new HashSet<String>();
-
- /** A map to hold the bundle to exception list */
- private static Map<Bundle, Set<String>> bundleToExceptionsSetMap = new HashMap<Bundle, Set<String>>();
-
+
+ /** A map to hold the bundle to exception list */
+ private static Map<Bundle, Set<String>> bundleToExceptionsSetMap = new HashMap<Bundle, Set<String>>();
+
/**
* A utility method to load a class using its name and a given class loader.
*
* @param className
- * The class name
+ * The class name
* @param bundle
- * The class loader
+ * The class loader
* @return The loaded class or <code>null</code> if could not be loaded
*/
protected static Class<?> loadClass(String className, String pluginId) {
- StringBuffer keyStringBuf = new StringBuffer(className.length()
- + pluginId.length() + 2); // 2 is for . and extra.
+ StringBuffer keyStringBuf = new StringBuffer(className.length() + pluginId.length() + 2); // 2 is for . and extra.
keyStringBuf.append(pluginId);
keyStringBuf.append('.');
keyStringBuf.append(className);
String keyString = keyStringBuf.toString();
WeakReference<Class<?>> ref = successLookupTable.get(keyString);
Class<?> found = (ref != null) ? ref.get() : null;
- if (found == null) {
- if (ref != null)
+ if(found == null) {
+ if(ref != null)
successLookupTable.remove(keyString);
- if (!failureLookupTable.contains(keyString)) {
+ if(!failureLookupTable.contains(keyString)) {
try {
Bundle bundle = basicGetPluginBundle(pluginId);
- if (bundle!=null){
- // never load the class if the bundle is not active other wise
- // we will cause the plugin to load
- // unless the class is in the exception list
- int state = bundle.getState();
- if ( state == org.osgi.framework.Bundle.ACTIVE || isInExceptionList(bundle,className)){
- found = bundle.loadClass(className);
- successLookupTable.put(keyString, new WeakReference<Class<?>>(found));
- if (state == org.osgi.framework.Bundle.ACTIVE){
- bundleToExceptionsSetMap.remove(bundle);
- }
- }
+ if(bundle != null) {
+ // never load the class if the bundle is not active other wise
+ // we will cause the plugin to load
+ // unless the class is in the exception list
+ int state = bundle.getState();
+ if(state == org.osgi.framework.Bundle.ACTIVE || isInExceptionList(bundle, className)) {
+ found = bundle.loadClass(className);
+ successLookupTable.put(keyString, new WeakReference<Class<?>>(found));
+ if(state == org.osgi.framework.Bundle.ACTIVE) {
+ bundleToExceptionsSetMap.remove(bundle);
+ }
+ }
} else {
failureLookupTable.add(keyString);
}
@@ -403,57 +415,64 @@ public class ExtendedElementTypeSetRegistry {
}
return found;
}
-
- /**
+
+ /**
* Given a bundle id, it checks if the bundle is found and activated. If it
* is, the method returns the bundle, otherwise it returns <code>null</code>.
*
* @param pluginId
- * the bundle ID
+ * the bundle ID
* @return the bundle, if found
*/
protected static Bundle getPluginBundle(String pluginId) {
Bundle bundle = basicGetPluginBundle(pluginId);
- if (null != bundle && bundle.getState() == org.osgi.framework.Bundle.ACTIVE)
+ if(null != bundle && bundle.getState() == org.osgi.framework.Bundle.ACTIVE)
return bundle;
return null;
}
-
- private static Bundle basicGetPluginBundle(String pluginId) {
- return Platform.getBundle(pluginId);
- }
- private static boolean isInExceptionList(Bundle bundle, String className) {
- String packageName = className.substring(0,className.lastIndexOf('.'));
- Set<String> exceptionSet = bundleToExceptionsSetMap.get(bundle);
- if (exceptionSet==null){
- Dictionary<String, String> dict = bundle.getHeaders();
- String value = dict.get("Eclipse-LazyStart"); //$NON-NLS-1$
- if (value!=null){
- int index = value.indexOf("exceptions"); //$NON-NLS-1$
- if (index!=-1){
- try {
- int start = value.indexOf('"',index+1);
- int end = value.indexOf('"',start+1);
- String exceptions = value.substring(start+1,end);
- exceptionSet = new HashSet<String>(2);
- StringTokenizer tokenizer = new StringTokenizer(exceptions, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- exceptionSet.add(tokenizer.nextToken().trim());
- }
- } catch(IndexOutOfBoundsException exception) {
- // this means the MF did not follow the documented format for the exceptions list so i'll consider it empty
- exceptionSet = Collections.emptySet();
- }
-
- } else {
- exceptionSet = Collections.emptySet();
- }
- } else {
- exceptionSet = Collections.emptySet();
- }
- bundleToExceptionsSetMap.put(bundle, exceptionSet);
- }
- return exceptionSet.contains(packageName);
- }
+ private static Bundle basicGetPluginBundle(String pluginId) {
+ return Platform.getBundle(pluginId);
+ }
+
+ private static boolean isInExceptionList(Bundle bundle, String className) {
+ String packageName = className.substring(0, className.lastIndexOf('.'));
+ Set<String> exceptionSet = bundleToExceptionsSetMap.get(bundle);
+ if(exceptionSet == null) {
+ Dictionary<String, String> dict = bundle.getHeaders();
+ String value = dict.get("Eclipse-LazyStart"); //$NON-NLS-1$
+ if(value != null) {
+ int index = value.indexOf("exceptions"); //$NON-NLS-1$
+ if(index != -1) {
+ try {
+ int start = value.indexOf('"', index + 1);
+ int end = value.indexOf('"', start + 1);
+ String exceptions = value.substring(start + 1, end);
+ exceptionSet = new HashSet<String>(2);
+ StringTokenizer tokenizer = new StringTokenizer(exceptions, ","); //$NON-NLS-1$
+ while(tokenizer.hasMoreTokens()) {
+ exceptionSet.add(tokenizer.nextToken().trim());
+ }
+ } catch (IndexOutOfBoundsException exception) {
+ // this means the MF did not follow the documented format for the exceptions list so i'll consider it empty
+ exceptionSet = Collections.emptySet();
+ }
+ } else {
+ exceptionSet = Collections.emptySet();
+ }
+ } else {
+ exceptionSet = Collections.emptySet();
+ }
+ bundleToExceptionsSetMap.put(bundle, exceptionSet);
+ }
+ return exceptionSet.contains(packageName);
+ }
+
+ /**
+ *
+ */
+ public void reset() {
+ init();
+
+ }
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java
index a6e0837a51c..e3b45cf1231 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java
@@ -42,6 +42,7 @@ public class ExtendedTypeRegistryService implements IService {
*/
public void disposeService() throws ServiceException {
// extended element type set registry should unregister all added element types in the gmf registry
+ ElementTypeSetUtils.resetRegistry();
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java
new file mode 100644
index 00000000000..720216a04f7
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.handler;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.extendedtypes.Activator;
+import org.eclipse.papyrus.infra.extendedtypes.ElementTypeSetUtils;
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSetRegistry;
+import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+
+/**
+ * Handler to deploy new configuration
+ */
+public class DeployExtendedTypeSetConfigurationHandler extends AbstractHandler implements IHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ if(!(currentSelection instanceof IStructuredSelection) || currentSelection.isEmpty()) {
+ return null;
+ }
+
+ final IStructuredSelection selection = (IStructuredSelection)currentSelection;
+
+ final Shell activeShell = HandlerUtil.getActiveShell(event);
+
+ Job job = new Job("Deploy extended type set configuration") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask("Deploying selected configurations", selection.size());
+
+ return doExecute(selection, monitor);
+ }
+ };
+
+ job.addJobChangeListener(new JobChangeAdapter() {
+
+ @Override
+ public void done(final IJobChangeEvent event) {
+ activeShell.getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ if(event.getResult().isOK()) {
+ MessageDialog.openInformation(activeShell, "Success", event.getResult().getMessage());
+ } else if(event.getResult().getSeverity() < IStatus.ERROR) { //Errors are already logged
+ StatusManager.getManager().handle(event.getResult(), StatusManager.SHOW);
+ }
+ }
+ });
+ }
+ });
+
+ job.setUser(true);
+ job.schedule();
+
+ return null;
+ }
+
+ protected IStatus doExecute(IStructuredSelection selection, IProgressMonitor monitor) {
+ Iterator<?> selectionIterator = selection.iterator();
+
+ MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, "The properties view configuration has been successfully deployed and activated", null);
+
+ while(selectionIterator.hasNext()) {
+ Object selectedElement = selectionIterator.next();
+ if(selectedElement instanceof IAdaptable) {
+ IFile selectedFile = (IFile)((IAdaptable)selectedElement).getAdapter(IFile.class);
+ if(selectedFile == null) {
+ monitor.worked(1);
+ result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a file"));
+ continue;
+ }
+
+
+ String fileName = selectedFile.getFullPath().removeFileExtension().lastSegment();
+ monitor.subTask("Deploy " + fileName);
+
+ URI emfURI = null;
+ if(selectedFile.getFullPath() != null) {
+ emfURI = URI.createPlatformResourceURI(selectedFile.getFullPath().toString(), true);
+ } else if(selectedFile.getRawLocation() != null) {
+ emfURI = URI.createFileURI(selectedFile.getRawLocation().toString());
+ }
+
+ if(emfURI == null) {
+ monitor.worked(1);
+ result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a valid configuration file"));
+ continue;
+ }
+
+ ExtendedTypesPreferences.registerWorkspaceDefinition(fileName, selectedFile.getFullPath().toString());
+
+ monitor.subTask("Reset Element Types Registry");
+ ElementTypeSetUtils.resetRegistry();
+ monitor.worked(1);
+
+ // relaunch papyrus service
+ ExtendedElementTypeSetRegistry.getInstance().reset();
+
+ result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, "The extended types configuration has been successfully deployed and activated"));
+ }
+ }
+
+ if(result.getChildren().length == 1) {
+ return result.getChildren()[0];
+ } else { //Merge the result and specify an appropriate message based on the result
+ if(result.isOK()) {
+ return result;
+ } else {
+ MultiStatus actualResult = new MultiStatus(Activator.PLUGIN_ID, result.getCode(), "Some errors occurred during the deployment", result.getException());
+ actualResult.merge(result);
+ return actualResult;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java
new file mode 100644
index 00000000000..1991fdb75df
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.handler;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.commands.IHandlerListener;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.extendedtypes.Activator;
+import org.eclipse.papyrus.infra.extendedtypes.ElementTypeSetUtils;
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSetRegistry;
+import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+
+/**
+ * @author RS211865
+ */
+public class UndeployExtendedTypeSetConfigurationHandler extends AbstractHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ if(!(currentSelection instanceof IStructuredSelection) || currentSelection.isEmpty()) {
+ return null;
+ }
+
+ final IStructuredSelection selection = (IStructuredSelection)currentSelection;
+
+ final Shell activeShell = HandlerUtil.getActiveShell(event);
+
+ Job job = new Job("Deploy extended type set configuration") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask("Deploying selected configurations", selection.size());
+
+ return doExecute(selection, monitor);
+ }
+ };
+
+ job.addJobChangeListener(new JobChangeAdapter() {
+
+ @Override
+ public void done(final IJobChangeEvent event) {
+ activeShell.getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ if(event.getResult().isOK()) {
+ MessageDialog.openInformation(activeShell, "Success", event.getResult().getMessage());
+ } else if(event.getResult().getSeverity() < IStatus.ERROR) { //Errors are already logged
+ StatusManager.getManager().handle(event.getResult(), StatusManager.SHOW);
+ }
+ }
+ });
+ }
+ });
+
+ job.setUser(true);
+ job.schedule();
+
+ return null;
+ }
+
+ protected IStatus doExecute(IStructuredSelection selection, IProgressMonitor monitor) {
+ Iterator<?> selectionIterator = selection.iterator();
+
+ MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, "The properties view configuration has been successfully deployed and activated", null);
+
+ while(selectionIterator.hasNext()) {
+ Object selectedElement = selectionIterator.next();
+ if(selectedElement instanceof IAdaptable) {
+ IFile selectedFile = (IFile)((IAdaptable)selectedElement).getAdapter(IFile.class);
+ if(selectedFile == null) {
+ monitor.worked(1);
+ result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a file"));
+ continue;
+ }
+
+
+ String fileName = selectedFile.getFullPath().removeFileExtension().lastSegment();
+ monitor.subTask("Deploy " + fileName);
+
+ URI emfURI = null;
+ if(selectedFile.getFullPath() != null) {
+ emfURI = URI.createPlatformResourceURI(selectedFile.getFullPath().toString(), true);
+ } else if(selectedFile.getRawLocation() != null) {
+ emfURI = URI.createFileURI(selectedFile.getRawLocation().toString());
+ }
+
+ if(emfURI == null) {
+ monitor.worked(1);
+ result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a valid configuration file"));
+ continue;
+ }
+
+ ExtendedTypesPreferences.unregisterWorkspaceDefinition(fileName);
+
+ monitor.subTask("Reset Element Types Registry");
+ ElementTypeSetUtils.resetRegistry();
+ monitor.worked(1);
+
+ // relaunch papyrus service
+ ExtendedElementTypeSetRegistry.getInstance().reset();
+
+ result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, "The extended types configuration has been successfully deployed and activated"));
+ }
+ }
+
+ if(result.getChildren().length == 1) {
+ return result.getChildren()[0];
+ } else { //Merge the result and specify an appropriate message based on the result
+ if(result.isOK()) {
+ return result;
+ } else {
+ MultiStatus actualResult = new MultiStatus(Activator.PLUGIN_ID, result.getCode(), "Some errors occurred during the deployment", result.getException());
+ actualResult.merge(result);
+ return actualResult;
+ }
+ }
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java
index caccc00c2bf..e02c87e3752 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java
@@ -16,6 +16,10 @@ package org.eclipse.papyrus.infra.extendedtypes.preferences;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
+import java.io.ObjectOutputStream.PutField;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.extendedtypes.Activator;
@@ -23,7 +27,6 @@ import org.eclipse.ui.IMemento;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.XMLMemento;
-
/**
* Preferences management for extended types
*/
@@ -35,6 +38,8 @@ public class ExtendedTypesPreferences {
/** id for the node: extended types redefinition */
public final static String EXTENDED_TYPES_REDEFINITION = "extendedTypesRedefinition"; //$NON-NLS-1$
+ public static final String EXTENDED_TYPES_SET_WORKSPACE_DEFINITION = "extendedTypeSetsWorkspaceDefinition";
+
/** name of the ID attribute */
public final static String ID = "id"; //$NON-NLS-1$
@@ -82,22 +87,17 @@ public class ExtendedTypesPreferences {
*/
public static IMemento registerLocalRedefinition(String extendedTypesID, String path) {
XMLMemento rootMemento = getLocalRedefinitions();
-
// try to find an existing local definition for this extendedTypes
IMemento memento = getExtendedTypesRedefinitionNode(extendedTypesID);
-
// if one exists, remove it from the preferences
if(memento != null) {
unregisterLocalRedefinition(extendedTypesID);
}
-
// then register the new one
IMemento newMemento = rootMemento.createChild(EXTENDED_TYPES_REDEFINITION);
newMemento.putString(ID, extendedTypesID);
newMemento.putString(PATH, path);
-
saveLocalRedefinitions(rootMemento);
-
return newMemento;
}
@@ -122,6 +122,39 @@ public class ExtendedTypesPreferences {
}
/**
+ * Returns the memento associated to the extendedTypes set definition in workspace, or <code>null</code> if none exists
+ *
+ * @return the memento found or <code>null</code> if no customization exists for this extendedTypes
+ */
+ protected static IMemento[] getWorkspaceDefinitions() {
+ XMLMemento rootMemento = getLocalRedefinitions();
+ IMemento[] workspaceDefinitions = rootMemento.getChildren(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION);
+ return workspaceDefinitions;
+ }
+
+ /**
+ * Returns the memento associated to the extendedTypes set definition in workspace, or <code>null</code> if none exists
+ *
+ * @return the memento found or <code>null</code> if no customization exists for this extendedTypes
+ */
+ protected static IMemento getWorkspaceDefinition(String extendedTypeSetsID) {
+ if(extendedTypeSetsID == null) {
+ return null;
+ }
+ IMemento[] workspaceDefinitions = getWorkspaceDefinitions();
+ if(workspaceDefinitions == null || workspaceDefinitions.length == 0) {
+ return null;
+ }
+ for(IMemento memento : workspaceDefinitions) {
+ String id = memento.getString(ID);
+ if(extendedTypeSetsID.equals(id)) {
+ return memento;
+ }
+ }
+ return null;
+ }
+
+ /**
* Returns the path for a given extended type local redefinition
*
* @param extendedTypesID
@@ -158,9 +191,33 @@ public class ExtendedTypesPreferences {
newRootMemento.putMemento(memento);
}
}
+ for(IMemento memento : rootMemento.getChildren(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION)) {
+ newRootMemento.putMemento(memento);
+ }
// save new Memento
saveLocalRedefinitions(newRootMemento);
+ }
+ /**
+ * @param extendedTypesID
+ */
+ public static void unregisterWorkspaceDefinition(String extendedTypesID) {
+ XMLMemento rootMemento = getLocalRedefinitions();
+ // no remove method...
+ // so, creation of a new root memento, then, duplicate all entries
+ // except the one to
+ // delete...
+ XMLMemento newRootMemento = XMLMemento.createWriteRoot(EXTENDED_TYPES_REDEFINITIONS);
+ for(IMemento memento : rootMemento.getChildren(EXTENDED_TYPES_REDEFINITION)) {
+ newRootMemento.putMemento(memento);
+ }
+ for(IMemento memento : rootMemento.getChildren(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION)) {
+ if(!memento.getString(ID).equals(extendedTypesID)) {
+ newRootMemento.putMemento(memento);
+ }
+ }
+ // save new Memento
+ saveLocalRedefinitions(newRootMemento);
}
/**
@@ -176,7 +233,6 @@ public class ExtendedTypesPreferences {
StringWriter writer = new StringWriter();
try {
xmlMemento.save(writer);
-
if(getPreferenceStore() != null) {
getPreferenceStore().setValue(key, writer.toString());
}
@@ -194,4 +250,50 @@ public class ExtendedTypesPreferences {
public static void saveLocalRedefinitions(XMLMemento rootMemento) {
saveMemento(rootMemento, EXTENDED_TYPES_REDEFINITIONS);
}
+
+ /**
+ * Returns all the paths in the workspace that should be an extended type set to load, with the id as a key
+ *
+ * @return
+ */
+ public static Map<String, String> getLocalExtendedTypesDefinitions() {
+ IMemento[] mementos = getWorkspaceDefinitions();
+ if(mementos != null && mementos.length > 0) {
+ Map<String, String> idToPath = new HashMap<String, String>();
+ for(IMemento memento : mementos) {
+ String id = memento.getString(ID);
+ String path = memento.getString(PATH);
+ if(id != null && !"".equals(id) && path != null && !"".equals(PATH)) {
+ idToPath.put(id, path);
+ }
+ }
+ return idToPath;
+ }
+ return null;
+ }
+
+ /**
+ * Register a new local redefinition of a extendedTypes.
+ *
+ * @param extendedTypesID
+ * the id of the extendedTypes to register
+ * @param path
+ * the path to the configuration of the extendedTypes
+ * @return the memento that has been registered
+ */
+ public static IMemento registerWorkspaceDefinition(String extendedTypesID, String path) {
+ XMLMemento rootMemento = getLocalRedefinitions();
+ // try to find an existing local definition for this extendedTypes
+ IMemento memento = getWorkspaceDefinition(extendedTypesID);
+ // if one exists, remove it from the preferences
+ if(memento != null) {
+ unregisterWorkspaceDefinition(extendedTypesID);
+ }
+ // then register the new one
+ IMemento newMemento = rootMemento.createChild(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION);
+ newMemento.putString(ID, extendedTypesID);
+ newMemento.putString(PATH, path);
+ saveLocalRedefinitions(rootMemento);
+ return newMemento;
+ }
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java_bak b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java_bak
deleted file mode 100644
index c1cefbd6660..00000000000
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java_bak
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.extendedtypes.types;
-
-import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeFactory;
-import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
-import org.eclipse.gmf.runtime.emf.type.core.ISpecializationTypeDescriptor;
-import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
-import org.eclipse.gmf.runtime.emf.type.core.internal.impl.HintedTypeFactory;
-import org.eclipse.papyrus.infra.extendedtypes.Activator;
-
-
-/**
- * Factory for ExtendedHintedType elements
- */
-public class ExtendedHintedTypeFactory extends AbstractElementTypeFactory {
-
- /**
- * The hinted type kind. This string is specified in the XML 'kind'
- * attribute of any element type that is a hinted type.
- */
- public static final String HINTED_TYPE_KIND = "org.eclipse.gmf.runtime.emf.core.internal.util.IHintedType"; //$NON-NLS-1$
-
- /**
- * The semantic hint parameter name.
- */
- public static final String SEMANTIC_HINT_PARAM_NAME = "semanticHint"; //$NON-NLS-1$
-
- /** singleton instance of this factory */
- private static ExtendedHintedTypeFactory instance;
-
- /**
- * Returns the singleton instance of this factory.
- *
- * @return the singleton instance of this factory.
- */
- public synchronized static ExtendedHintedTypeFactory getInstance() {
- if(instance == null) {
- instance = new ExtendedHintedTypeFactory();
- }
- return instance;
- }
-
- /**
- * Private Constructor.
- *
- */
- private ExtendedHintedTypeFactory() {
-
- }
-
- /**
- * The extended hinted specialization type class.
- */
- private static final class ExtendedHintedSpecializationType extends SpecializationType implements IExtendedHintedElementType {
-
- /** The semantic hint */
- private final String semanticHint;
-
- /** element type configuration */
- private final ExtendedElementTypeConfiguration configuration;
-
- /**
- * Constructs a new hinted type.
- *
- * @param descriptor
- * the specialization type descriptor
- * @param semanticHint
- * the semantic hint
- */
- public ExtendedHintedSpecializationType(ISpecializationTypeDescriptor descriptor, String semanticHint, ExtendedElementTypeConfiguration configuration) {
- super(descriptor);
- this.semanticHint = semanticHint;
- this.configuration = configuration;
- }
-
- /**
- * Gets the semantic hint.
- */
- public String getSemanticHint() {
- return semanticHint;
- }
-
- /**
- * {@inheritDoc}
- */
- public ExtendedElementTypeConfiguration getConfiguration() {
- return configuration;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("restriction")
- @Override
- public ISpecializationType createSpecializationType(ISpecializationTypeDescriptor descriptor) {
-
- String semanticHint = descriptor.getParamValue(SEMANTIC_HINT_PARAM_NAME);
-
- if(descriptor instanceof ExtendedSemanticTypeDescriptor) {
- ExtendedElementTypeConfiguration configuration = ((ExtendedSemanticTypeDescriptor)descriptor).getConfiguration();
- return new ExtendedHintedSpecializationType(descriptor, semanticHint, configuration);
- }
-
- // used default factory. Should never happen
- Activator.log.warn("The Extended type factory should never use HintedTypeFactory from GMF");
- return new HintedTypeFactory().createSpecializationType(descriptor);
- }
-
-
-}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di
index d8872ffde77..fe0fac7eeed 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di
@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmi:id="_YCELMP1VEd-WkaQf4YgINA">
- <pageList xmi:id="_YCELMf1VEd-WkaQf4YgINA">
- <availablePage>
- <emfPageIdentifier href="model.notation#_B7UjoGe1EeOCxY1uxkJbkw"/>
- </availablePage>
- <availablePage>
- <emfPageIdentifier href="model.notation#_MSbgYGfAEeOeZsTtUeHY9w"/>
- </availablePage>
- </pageList>
- <sashModel xmi:id="_YCELMv1VEd-WkaQf4YgINA" currentSelection="_YCELNP1VEd-WkaQf4YgINA">
- <windows xmi:id="_YCELM_1VEd-WkaQf4YgINA">
- <children xsi:type="di:TabFolder" xmi:id="_YCELNP1VEd-WkaQf4YgINA">
- <children>
- <emfPageIdentifier href="model.notation#_MSbgYGfAEeOeZsTtUeHY9w"/>
- </children>
- </children>
- </windows>
- </sashModel>
-</di:SashWindowsMngr>
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmi:id="_YCELMP1VEd-WkaQf4YgINA">
+ <pageList xmi:id="_YCELMf1VEd-WkaQf4YgINA">
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_B7UjoGe1EeOCxY1uxkJbkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_MSbgYGfAEeOeZsTtUeHY9w"/>
+ </availablePage>
+ </pageList>
+ <sashModel xmi:id="_YCELMv1VEd-WkaQf4YgINA" currentSelection="_YCELNP1VEd-WkaQf4YgINA">
+ <windows xmi:id="_YCELM_1VEd-WkaQf4YgINA">
+ <children xsi:type="di:TabFolder" xmi:id="_YCELNP1VEd-WkaQf4YgINA">
+ <children>
+ <emfPageIdentifier href="model.notation#_MSbgYGfAEeOeZsTtUeHY9w"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation
index 592c5c74870..3b747205180 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation
@@ -1,111 +1,111 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
- <notation:Diagram xmi:id="_B7UjoGe1EeOCxY1uxkJbkw" type="BlockDefinition" name="Main" measurementUnit="Pixel">
- <styles xmi:type="notation:DiagramStyle" xmi:id="_B7UjoWe1EeOCxY1uxkJbkw"/>
- <element xmi:type="uml:Model" href="model.uml#_X66aUf1VEd-WkaQf4YgINA"/>
- </notation:Diagram>
- <notation:Diagram xmi:id="_MSbgYGfAEeOeZsTtUeHY9w" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_NqqeoGfAEeOeZsTtUeHY9w" type="2007">
- <children xmi:type="notation:DecorationNode" xmi:id="_NqqeomfAEeOeZsTtUeHY9w" type="5026"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_Nqqeo2fAEeOeZsTtUeHY9w" type="7016">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_NqwlQGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_NqwlQWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_SYI6YGfAEeOeZsTtUeHY9w" type="3021">
- <children xmi:type="notation:DecorationNode" xmi:id="_SYI6YmfAEeOeZsTtUeHY9w" type="5043"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_SYJhcGfAEeOeZsTtUeHY9w" type="7023">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SYL9sGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SYL9sWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_SYJhcWfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_SYJhcmfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_SYJhc2fAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYJhdGfAEeOeZsTtUeHY9w"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_SYJhdWfAEeOeZsTtUeHY9w" type="7024">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SYMkwGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SYMkwWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_SYJhdmfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_SYJhd2fAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_SYJheGfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYJheWfAEeOeZsTtUeHY9w"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_SYJhemfAEeOeZsTtUeHY9w" type="7025">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SYNL0GfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SYNL0WfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_SYJhe2fAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_SYJhfGfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_SYJhfWfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYJhfmfAEeOeZsTtUeHY9w"/>
- </children>
- <element xmi:type="uml:Component" href="model.uml#_TCAGQGc9EeOeFPMFS4Wv8Q"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYI6YWfAEeOeZsTtUeHY9w" x="45" y="15"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_NqqepGfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NqqepWfAEeOeZsTtUeHY9w"/>
- </children>
- <element xmi:type="uml:Package" href="model.uml#_Caa0gGczEeO-Gf1_f5pJdw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NqqeoWfAEeOeZsTtUeHY9w" x="186" y="281" width="355" height="168"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_Oclq0GfAEeOeZsTtUeHY9w" type="2007">
- <children xmi:type="notation:DecorationNode" xmi:id="_OcmR4GfAEeOeZsTtUeHY9w" type="5026"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_OcmR4WfAEeOeZsTtUeHY9w" type="7016">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_OcmR5GfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ocm48GfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_OcmR4mfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcmR42fAEeOeZsTtUeHY9w"/>
- </children>
- <element xmi:type="uml:Package" href="model.uml#_dHWqAP1VEd-WkaQf4YgINA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Oclq0WfAEeOeZsTtUeHY9w" x="523" y="99" width="339" height="146"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_Pf9zYGfAEeOeZsTtUeHY9w" type="2007">
- <children xmi:type="notation:DecorationNode" xmi:id="_Pf9zYmfAEeOeZsTtUeHY9w" type="5026"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_Pf9zY2fAEeOeZsTtUeHY9w" type="7016">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Pf-acGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Pf-acWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_M-FFcGfAEeOeZsTtUeHY9w" type="2002">
- <children xmi:type="notation:DecorationNode" xmi:id="_M-JW4GfAEeOeZsTtUeHY9w" type="5005"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_M-OPYGfAEeOeZsTtUeHY9w" type="7002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-q7UGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-riYGfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_M-OPYWfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_M-OPYmfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_M-OPY2fAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-OPZGfAEeOeZsTtUeHY9w"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_M-OPZWfAEeOeZsTtUeHY9w" type="7003">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-sJcGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-sJcWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_M-OPZmfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_M-OPZ2fAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_M-OPaGfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-OPaWfAEeOeZsTtUeHY9w"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_M-O2cGfAEeOeZsTtUeHY9w" type="7004">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-swgGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-swgWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_M-O2cWfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_M-O2cmfAEeOeZsTtUeHY9w"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_M-O2c2fAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-O2dGfAEeOeZsTtUeHY9w"/>
- </children>
- <element xmi:type="uml:Component" href="model.uml#_M9hEwGfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-FFcWfAEeOeZsTtUeHY9w" x="31" y="18"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_Pf9zZGfAEeOeZsTtUeHY9w"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pf9zZWfAEeOeZsTtUeHY9w"/>
- </children>
- <element xmi:type="uml:Package" href="model.uml#_b1QI8P1VEd-WkaQf4YgINA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pf9zYWfAEeOeZsTtUeHY9w" x="188" y="74" width="269" height="191"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_MScHcGfAEeOeZsTtUeHY9w"/>
- <element xmi:type="uml:Model" href="model.uml#_X66aUf1VEd-WkaQf4YgINA"/>
- </notation:Diagram>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
+ <notation:Diagram xmi:id="_B7UjoGe1EeOCxY1uxkJbkw" type="BlockDefinition" name="Main" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_B7UjoWe1EeOCxY1uxkJbkw"/>
+ <element xmi:type="uml:Model" href="model.uml#_X66aUf1VEd-WkaQf4YgINA"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_MSbgYGfAEeOeZsTtUeHY9w" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_NqqeoGfAEeOeZsTtUeHY9w" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_NqqeomfAEeOeZsTtUeHY9w" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nqqeo2fAEeOeZsTtUeHY9w" type="7016">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_NqwlQGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_NqwlQWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_SYI6YGfAEeOeZsTtUeHY9w" type="3021">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SYI6YmfAEeOeZsTtUeHY9w" type="5043"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SYJhcGfAEeOeZsTtUeHY9w" type="7023">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SYL9sGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SYL9sWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SYJhcWfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SYJhcmfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SYJhc2fAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYJhdGfAEeOeZsTtUeHY9w"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SYJhdWfAEeOeZsTtUeHY9w" type="7024">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SYMkwGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SYMkwWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SYJhdmfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SYJhd2fAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SYJheGfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYJheWfAEeOeZsTtUeHY9w"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SYJhemfAEeOeZsTtUeHY9w" type="7025">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SYNL0GfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SYNL0WfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SYJhe2fAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SYJhfGfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SYJhfWfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYJhfmfAEeOeZsTtUeHY9w"/>
+ </children>
+ <element xmi:type="uml:Component" href="model.uml#_TCAGQGc9EeOeFPMFS4Wv8Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SYI6YWfAEeOeZsTtUeHY9w" x="13" y="1"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_NqqepGfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NqqepWfAEeOeZsTtUeHY9w"/>
+ </children>
+ <element xmi:type="uml:Package" href="model.uml#_Caa0gGczEeO-Gf1_f5pJdw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NqqeoWfAEeOeZsTtUeHY9w" x="186" y="281" width="355" height="168"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Oclq0GfAEeOeZsTtUeHY9w" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_OcmR4GfAEeOeZsTtUeHY9w" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_OcmR4WfAEeOeZsTtUeHY9w" type="7016">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_OcmR5GfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ocm48GfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OcmR4mfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcmR42fAEeOeZsTtUeHY9w"/>
+ </children>
+ <element xmi:type="uml:Package" href="model.uml#_dHWqAP1VEd-WkaQf4YgINA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Oclq0WfAEeOeZsTtUeHY9w" x="523" y="99" width="339" height="146"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Pf9zYGfAEeOeZsTtUeHY9w" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Pf9zYmfAEeOeZsTtUeHY9w" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Pf9zY2fAEeOeZsTtUeHY9w" type="7016">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Pf-acGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Pf-acWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_M-FFcGfAEeOeZsTtUeHY9w" type="2002">
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-JW4GfAEeOeZsTtUeHY9w" type="5005"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_M-OPYGfAEeOeZsTtUeHY9w" type="7002">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-q7UGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-riYGfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_M-OPYWfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_M-OPYmfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_M-OPY2fAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-OPZGfAEeOeZsTtUeHY9w"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_M-OPZWfAEeOeZsTtUeHY9w" type="7003">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-sJcGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-sJcWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_M-OPZmfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_M-OPZ2fAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_M-OPaGfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-OPaWfAEeOeZsTtUeHY9w"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_M-O2cGfAEeOeZsTtUeHY9w" type="7004">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-swgGfAEeOeZsTtUeHY9w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-swgWfAEeOeZsTtUeHY9w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_M-O2cWfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_M-O2cmfAEeOeZsTtUeHY9w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_M-O2c2fAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-O2dGfAEeOeZsTtUeHY9w"/>
+ </children>
+ <element xmi:type="uml:Component" href="model.uml#_M9hEwGfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-FFcWfAEeOeZsTtUeHY9w" x="31" y="18"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Pf9zZGfAEeOeZsTtUeHY9w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pf9zZWfAEeOeZsTtUeHY9w"/>
+ </children>
+ <element xmi:type="uml:Package" href="model.uml#_b1QI8P1VEd-WkaQf4YgINA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pf9zYWfAEeOeZsTtUeHY9w" x="188" y="74" width="269" height="191"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_MScHcGfAEeOeZsTtUeHY9w"/>
+ <element xmi:type="uml:Model" href="model.uml#_X66aUf1VEd-WkaQf4YgINA"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml
index 03d6a008002..c4abd536a0e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml
@@ -1,91 +1,91 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExtendedTypesTestsProfile="http:///schemas/ExtendedTypesTestsProfile/_5IfFAGcEEeO5043Nsj3xUw/2" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExtendedTypesTestsProfile/_5IfFAGcEEeO5043Nsj3xUw/2 ExtendedTypesTestsProfile.profile.uml#_5IfFAWcEEeO5043Nsj3xUw">
- <uml:Model xmi:id="_X66aUf1VEd-WkaQf4YgINA" name="Model">
- <packageImport xmi:type="uml:PackageImport" xmi:id="_X66aUv1VEd-WkaQf4YgINA">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Package" xmi:id="_b1QI8P1VEd-WkaQf4YgINA" name="PackageWithComponents">
- <packagedElement xmi:type="uml:Component" xmi:id="_Y-QksGe-EeOeZsTtUeHY9w" name="Component2"/>
- <packagedElement xmi:type="uml:Component" xmi:id="_M9hEwGfAEeOeZsTtUeHY9w" name="Component1"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_dHWqAP1VEd-WkaQf4YgINA" name="PackageWithAllElements"/>
- <packagedElement xmi:type="uml:Package" xmi:id="_Caa0gGczEeO-Gf1_f5pJdw" name="OtherPackageWithComponents">
- <packagedElement xmi:type="uml:Component" xmi:id="_8PG7EGctEeOYUqC_A3tTEw" name="Component"/>
- <packagedElement xmi:type="uml:Component" xmi:id="_TCAGQGc9EeOeFPMFS4Wv8Q" name="Component1"/>
- </packagedElement>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_dj-KoGcFEeOea9k8XF7uAg">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dkH7oGcFEeOea9k8XF7uAg" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="ExtendedTypesTestsProfile.profile.uml#_5IfFAWcEEeO5043Nsj3xUw"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="ExtendedTypesTestsProfile.profile.uml#_sK148Gb7EeOyHY5evmQkxA"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__7kSYGe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__8L9cGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__8L9cWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__8e4YGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__8e4YWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__8opYGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__8opYWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__87kUGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__87kUWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__9OfQGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__9OfQWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__9YQQGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__9YQQWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__9rLMGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__9rLMWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__90VIGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__90VIWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__-H3IGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__-H3IWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__-RBEGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__-RBEWe0EeOCxY1uxkJbkw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__-ayEGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
- </profileApplication>
- </uml:Model>
- <ExtendedTypesTestsProfile:PackageWithComponents xmi:id="_keWi0GcFEeOea9k8XF7uAg" base_Element="_b1QI8P1VEd-WkaQf4YgINA"/>
- <ExtendedTypesTestsProfile:PackageWithComponents xmi:id="_FHOZAGczEeO-Gf1_f5pJdw" base_Element="_Caa0gGczEeO-Gf1_f5pJdw"/>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExtendedTypesTestsProfile="http:///schemas/ExtendedTypesTestsProfile/_5IfFAGcEEeO5043Nsj3xUw/2" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExtendedTypesTestsProfile/_5IfFAGcEEeO5043Nsj3xUw/2 ExtendedTypesTestsProfile.profile.uml#_5IfFAWcEEeO5043Nsj3xUw">
+ <uml:Model xmi:id="_X66aUf1VEd-WkaQf4YgINA" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_X66aUv1VEd-WkaQf4YgINA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_b1QI8P1VEd-WkaQf4YgINA" name="PackageWithComponents">
+ <packagedElement xmi:type="uml:Component" xmi:id="_Y-QksGe-EeOeZsTtUeHY9w" name="Component2"/>
+ <packagedElement xmi:type="uml:Component" xmi:id="_M9hEwGfAEeOeZsTtUeHY9w" name="Component1"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_dHWqAP1VEd-WkaQf4YgINA" name="PackageWithAllElements"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_Caa0gGczEeO-Gf1_f5pJdw" name="OtherPackageWithComponents">
+ <packagedElement xmi:type="uml:Component" xmi:id="_8PG7EGctEeOYUqC_A3tTEw" name="Component"/>
+ <packagedElement xmi:type="uml:Component" xmi:id="_TCAGQGc9EeOeFPMFS4Wv8Q" name="Component1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_dj-KoGcFEeOea9k8XF7uAg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dkH7oGcFEeOea9k8XF7uAg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="ExtendedTypesTestsProfile.profile.uml#_5IfFAWcEEeO5043Nsj3xUw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="ExtendedTypesTestsProfile.profile.uml#_sK148Gb7EeOyHY5evmQkxA"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__7kSYGe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__8L9cGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__8L9cWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__8e4YGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__8e4YWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__8opYGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__8opYWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__87kUGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__87kUWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__9OfQGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__9OfQWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__9YQQGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__9YQQWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__9rLMGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__9rLMWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__90VIGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__90VIWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__-H3IGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__-H3IWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__-RBEGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__-RBEWe0EeOCxY1uxkJbkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__-ayEGe0EeOCxY1uxkJbkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <ExtendedTypesTestsProfile:PackageWithComponents xmi:id="_keWi0GcFEeOea9k8XF7uAg" base_Element="_b1QI8P1VEd-WkaQf4YgINA"/>
+ <ExtendedTypesTestsProfile:PackageWithComponents xmi:id="_FHOZAGczEeO-Gf1_f5pJdw" base_Element="_Caa0gGczEeO-Gf1_f5pJdw"/>
+</xmi:XMI>

Back to the top