aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2017-11-13 10:18:28 -0500
committerBenoit Maggi2017-11-21 10:20:41 -0500
commit2e2b87268635683d3d68b2d777b3cbcea8f47ef9 (patch)
treeceb034d9caceb1788f5d154b47c49ad388daf85e
parent8eca02ee0e11692796d583e3b86df24540f34100 (diff)
downloadorg.eclipse.papyrus-master.zip
org.eclipse.papyrus-master.tar.gz
org.eclipse.papyrus-master.tar.xz
Bug 518406 - [Stereotype] Stereotype definition is not moved when theHEADmaster
element is moved from resources - also move stereotype application when moving an UML element - add a preference to configure this option (default is set to keep stereotype with element) - remove README referencing a closed bug - fix a warning in Activator Change-Id: Ibb1bbdb93c4a6c911bc5deea1c9fc2832843335f Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types.ui/plugin.xml12
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/Messages.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/messages.properties2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/preferences/UMLElementTypePreferencePage.java52
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/README7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/build.properties3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/plugin.xml10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/Activator.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/StereotypeApplicationMoveCommand.java72
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/preferences/UMLElementTypePreferenceInitializer.java40
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml2
14 files changed, 233 insertions, 13 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/META-INF/MANIFEST.MF
index d527e39..c8228c4 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/META-INF/MANIFEST.MF
@@ -14,6 +14,8 @@ Export-Package: org.eclipse.papyrus.uml.service.types.internal.ui;x-internal:=tr
org.eclipse.papyrus.uml.service.types.internal.ui.advice;x-internal:=true,
org.eclipse.papyrus.uml.service.types.internal.ui.commands;x-internal:=true,
org.eclipse.papyrus.uml.service.types.internal.ui.dialogs;x-internal:=true,
+ org.eclipse.papyrus.uml.service.types.internal.ui.messages,
+ org.eclipse.papyrus.uml.service.types.internal.ui.preferences,
org.eclipse.papyrus.uml.service.types.ui.handlers,
org.eclipse.papyrus.uml.service.types.ui.menu,
org.eclipse.papyrus.uml.service.types.ui.util
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/plugin.xml
index d82325a..cc6e2d6 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/plugin.xml
@@ -1591,5 +1591,17 @@
</image>
</extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ id="org.eclipse.papyrus.uml.service.types.internal.ui.preferences"
+ category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
+ class="org.eclipse.papyrus.uml.service.types.internal.ui.preferences.UMLElementTypePreferencePage"
+ name="UML ElementType">
+ </page>
+ </extension>
+
+
</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/Messages.java b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/Messages.java
index 2219612..d110445 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/Messages.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/Messages.java
@@ -67,6 +67,10 @@ public class Messages extends NLS {
public static String InformationItemValidator_2;
+ public static String UMLElementTypePreferencePage_KeepStereotypeApplicationText;
+
+ public static String UMLElementTypePreferencePage_PageDescription;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/messages.properties b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/messages.properties
index 57d9025..b2d8270 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/messages.properties
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/messages/messages.properties
@@ -34,3 +34,5 @@ InformationItemElementTreeSelectionDialog_0=New InformationItem
InformationItemValidator_0=No selection found
InformationItemValidator_1=Selection validated
InformationItemValidator_2=Selection has to be a Classifier or an Information Item.
+UMLElementTypePreferencePage_KeepStereotypeApplicationText=Keep stereotype application in same resource
+UMLElementTypePreferencePage_PageDescription=Options for UML element types
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/preferences/UMLElementTypePreferencePage.java b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/preferences/UMLElementTypePreferencePage.java
new file mode 100644
index 0000000..1f75062
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types.ui/src/org/eclipse/papyrus/uml/service/types/internal/ui/preferences/UMLElementTypePreferencePage.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * 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:
+ * Benoit Maggi (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.service.types.internal.ui.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.papyrus.uml.service.types.Activator;
+import org.eclipse.papyrus.uml.service.types.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.service.types.preferences.UMLElementTypePreferenceInitializer;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+
+/**
+ * Preferences for UML element types
+ */
+
+public class UMLElementTypePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public UMLElementTypePreferencePage() {
+ super(GRID);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setDescription(Messages.UMLElementTypePreferencePage_PageDescription);
+ }
+
+ @Override
+ public void createFieldEditors() {
+ addField(new BooleanFieldEditor(UMLElementTypePreferenceInitializer.MOVE_STEREOTYPEAPPLICATION_ELEMENT_IN_SAME_RESOURCE,Messages.UMLElementTypePreferencePage_KeepStereotypeApplicationText, getFieldEditorParent()));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.service.types/META-INF/MANIFEST.MF
index 2c8cd71..61f71ec2 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/META-INF/MANIFEST.MF
@@ -6,6 +6,9 @@ Export-Package: org.eclipse.papyrus.uml.service.types,
org.eclipse.papyrus.uml.service.types.helper,
org.eclipse.papyrus.uml.service.types.helper.advice,
org.eclipse.papyrus.uml.service.types.matcher,
+ org.eclipse.papyrus.uml.service.types.messages,
+ org.eclipse.papyrus.uml.service.types.preferences,
+ org.eclipse.papyrus.uml.service.types.request,
org.eclipse.papyrus.uml.service.types.utils
Require-Bundle: org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/README b/plugins/uml/org.eclipse.papyrus.uml.service.types/README
deleted file mode 100644
index 26708a3..0000000
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/README
+++ /dev/null
@@ -1,7 +0,0 @@
-bug 492522: [All Diagrams] Delete from model on comment links does not work (does a delete from diagram)
-https://bugs.eclipse.org/bugs/show_bug.cgi?id=492522
-
-1. Delete from model for a link representing a feature (like the comment link mapped on Comment#annotatedElement, the contraint link mapped on Contraints#contrainedElements and others)
-must remove the referenced element of the feature
-2. To do that we need to map the type of the link (visual id) to a feature and we need to use the same id for all diagrams
-3. if these conditions are respected, the uml service type is able to remove all representations of a given link doing Delete From Model for a link \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/build.properties b/plugins/uml/org.eclipse.papyrus.uml.service.types/build.properties
index 638dbea..9b877be 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/build.properties
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/build.properties
@@ -3,7 +3,8 @@ bin.includes = META-INF/,\
about.html,\
plugin.properties,\
icons/,\
- model/
+ model/,\
+ plugin.xml
output.. = bin/
src.includes = about.html
source.. = src/,src-gen/
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.service.types/plugin.xml
new file mode 100644
index 0000000..e4ce2fc
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/plugin.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.uml.service.types.preferences.UMLElementTypePreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/Activator.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/Activator.java
index 3c7cf5d..808e766 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/Activator.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/Activator.java
@@ -61,7 +61,7 @@ public class Activator extends Plugin {
public IPreferenceStore getPreferenceStore() {
// Create the preference store lazily.
if (preferenceStore == null) {
- preferenceStore = new ScopedPreferenceStore(new InstanceScope(), getBundle().getSymbolicName());
+ preferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, getBundle().getSymbolicName());
}
return preferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/StereotypeApplicationMoveCommand.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/StereotypeApplicationMoveCommand.java
new file mode 100644
index 0000000..8679a9f
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/StereotypeApplicationMoveCommand.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * 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:
+ * Benoit Maggi (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.service.types.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * A Command to move all stereotype applications applied to an UML Element
+ * from a Resource to an other Resource
+ */
+public class StereotypeApplicationMoveCommand extends AbstractTransactionalCommand {
+
+ Element element;
+ Resource source;
+ Resource target;
+
+ /**
+ * Constructor.
+ *
+ * @param request
+ */
+ public StereotypeApplicationMoveCommand(TransactionalEditingDomain domain,Element element, Resource source, Resource target) {
+ super(domain, "Move stereotype application", null);
+ this.element = element;
+ this.source = source;
+ this.target = target;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (element != null && target != null) {
+ EList<EObject> stereotypeApplications = element.getStereotypeApplications();
+ EList<EObject> targetList = target.getContents();
+ for (EObject next : stereotypeApplications) {
+ if (next.eResource() == source) {
+ targetList.add(next);
+ }
+ }
+ }
+ return CommandResult.newOKCommandResult();
+ }
+
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java
index affec39..2cbe5ae 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java
@@ -12,23 +12,23 @@
* Christian W. Damus - bug 467016
* Christian W. Damus - bug 459701
* Sebastien Bordes (Esterel Technologies SAS) - bug 497800
- * Benoit Maggi (CEA LIST) - bug 516513
+ * Benoit Maggi (CEA LIST) - bug 516513, 518406
*****************************************************************************/
package org.eclipse.papyrus.uml.service.types.helper;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
@@ -42,6 +42,9 @@ import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.papyrus.uml.service.types.Activator;
+import org.eclipse.papyrus.uml.service.types.command.StereotypeApplicationMoveCommand;
+import org.eclipse.papyrus.uml.service.types.preferences.UMLElementTypePreferenceInitializer;
import org.eclipse.papyrus.uml.tools.model.UmlUtils;
import org.eclipse.papyrus.uml.types.core.edithelper.DefaultUMLEditHelper;
import org.eclipse.uml2.uml.Element;
@@ -149,10 +152,18 @@ public class ElementEditHelper extends DefaultUMLEditHelper {
if (elementsToMove != null) {
for (Object object : elementsToMove.keySet()) {
if (object instanceof Element) {
- ICommand deleteContainmentLinks = getDeleteContainmentLinkCommand(req.getEditingDomain(), (Element) object, (Element) targetContainer);
+ Element element = (Element) object;
+ ICommand deleteContainmentLinks = getDeleteContainmentLinkCommand(req.getEditingDomain(), element, (Element) targetContainer);
if (deleteContainmentLinks.canExecute()) {
moveCommand = CompositeCommand.compose(moveCommand, deleteContainmentLinks);
}
+ boolean alsoMoveStereotypeApplication = Activator.getDefault().getPreferenceStore().getBoolean(UMLElementTypePreferenceInitializer.MOVE_STEREOTYPEAPPLICATION_ELEMENT_IN_SAME_RESOURCE);
+ if (alsoMoveStereotypeApplication) {
+ ICommand moveStereotypeCommand = getMoveStereotypeCommand(req, element, element.eResource(), targetContainer.eResource());
+ if (moveStereotypeCommand.canExecute()) {
+ moveCommand = CompositeCommand.compose(moveCommand, moveStereotypeCommand);
+ }
+ }
}
}
}
@@ -215,4 +226,20 @@ public class ElementEditHelper extends DefaultUMLEditHelper {
}
return cc;
}
+
+ /**
+ * Construct a command to move stereotype application if required
+ * @param request
+ * @param element
+ * @param source
+ * @param target
+ * @return
+ */
+ private ICommand getMoveStereotypeCommand(MoveRequest request, Element element, Resource source, Resource target) {
+ if (target != null && !target.equals(source)) {
+ return new StereotypeApplicationMoveCommand(request.getEditingDomain(), element, source, target);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/preferences/UMLElementTypePreferenceInitializer.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/preferences/UMLElementTypePreferenceInitializer.java
new file mode 100644
index 0000000..8cf666a
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/preferences/UMLElementTypePreferenceInitializer.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * 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:
+ * Benoit Maggi (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.service.types.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.service.types.Activator;
+
+public class UMLElementTypePreferenceInitializer extends AbstractPreferenceInitializer {
+
+
+ /**
+ * Preference key for allowing move of stereotype application in the same resource as
+ * their base element
+ */
+ public static final String MOVE_STEREOTYPEAPPLICATION_ELEMENT_IN_SAME_RESOURCE = "MOVE_STEREOTYPEAPPLICATION_ELEMENT_IN_SAME_RESOURCE"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ store.setDefault(MOVE_STEREOTYPEAPPLICATION_ELEMENT_IN_SAME_RESOURCE, true);
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml
index 73bb85e..d86bad7 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml
@@ -11,4 +11,6 @@
</adapter>
</factory>
</extension>
+
+
</plugin>