Bug 522294 Disable Expansion default drop

 - force preference for expansion drop to false when the parametric
plugin is started

Change-Id: I8da26125c669e90f7bd9eb0bfcfa3caee1ec7668
Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
diff --git a/diagram/org.eclipse.papyrus.sysml14.diagram.parametric/src/org/eclipse/papyrus/sysml14/diagram/parametric/Activator.java b/diagram/org.eclipse.papyrus.sysml14.diagram.parametric/src/org/eclipse/papyrus/sysml14/diagram/parametric/Activator.java
index 445a5ef..c4a1d49 100644
--- a/diagram/org.eclipse.papyrus.sysml14.diagram.parametric/src/org/eclipse/papyrus/sysml14/diagram/parametric/Activator.java
+++ b/diagram/org.eclipse.papyrus.sysml14.diagram.parametric/src/org/eclipse/papyrus/sysml14/diagram/parametric/Activator.java
@@ -12,8 +12,11 @@
  *****************************************************************************/
 package org.eclipse.papyrus.sysml14.diagram.parametric;
 
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
 
 /**
  * The activator class controls the plug-in life cycle
@@ -24,10 +27,24 @@
 	public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml14.diagram.parametric"; //$NON-NLS-1$
 
 	/**
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 *
+	 * @param context
+	 * @throws Exception
+	 */
+	@Override //FIXME : remove the code after Papyrus Core Oxygen.2 (See Bug 522295)
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		IEclipsePreferences node = InstanceScope.INSTANCE.getNode("org.eclipse.papyrus.infra.gmfdiag.dnd"); //$NON-NLS-1$
+		node.put("org.eclipse.papyrus.infra.gmfdiag.dnd.expansiondropsteategy.isActive", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
 	 * Returns an image descriptor for the image file at the given
 	 * plug-in relative path
 	 *
-	 * @param path the path
+	 * @param path
+	 *            the path
 	 * @return the image descriptor
 	 */
 	public static ImageDescriptor getImageDescriptor(String path) {