Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-04-25 09:00:08 +0000
committerMickael ADAM2016-05-03 15:37:09 +0000
commit5fd08f0df30ff6ead65ff15898839ab8ec9d29a3 (patch)
treea1b6fe8955128cb4d5d69aff395ee3ce88dabfd9
parentad36682d1ea37d37b4189b3dec6e989c4de3e967 (diff)
downloadorg.eclipse.papyrus-5fd08f0df30ff6ead65ff15898839ab8ec9d29a3.tar.gz
org.eclipse.papyrus-5fd08f0df30ff6ead65ff15898839ab8ec9d29a3.tar.xz
org.eclipse.papyrus-5fd08f0df30ff6ead65ff15898839ab8ec9d29a3.zip
Bug 492194 - [NewChild] it should be possible to hide NewChild
contribution https://bugs.eclipse.org/bugs/show_bug.cgi?id=492194 Conflicts: features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml Change-Id: I8ff8a6324a1d3cd92b774e0cca3c3d21f52591fb Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml4
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/plugin.xml126
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuRegistry.java630
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.classpath7
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.project30
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.core.prefs310
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.ui.prefs126
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.pde.api.tools.prefs98
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/META-INF/MANIFEST.MF15
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/about.html28
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/build.properties6
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.properties14
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.xml85
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/pom.xml12
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/Activator.java65
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/handler/DeployCreationMenuModelHandler.java (renamed from plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/handler/DeployCreationMenuModelHandler.java)3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/handler/UndeployCreationMenuModelHandler.java (renamed from plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/handler/UndeployCreationMenuModelHandler.java)4
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/preferences/Preferences.java168
-rw-r--r--plugins/infra/ui/pom.xml1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project28
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild/plugin.xml2
22 files changed, 1460 insertions, 306 deletions
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml
index 8c6188f6d2f..f692c1f6d3f 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.ui.feature/feature.xml
@@ -35,6 +35,8 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.infra.editor.welcome" install-size="0" unpack="false" version="0.0.0"/>
- <plugin download-size="0" id="org.eclipse.papyrus.infra.editor.welcome.nattable" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.papyrus.infra.editor.welcome.nattable" install-size="0" unpack="false" version="0.0.0"/>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.infra.newchild.ui" install-size="0" unpack="false" version="0.0.0"/>
</feature>
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
index 2216298957b..90bb571a913 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Export-Package: org.eclipse.papyrus.infra.newchild,
org.eclipse.papyrus.infra.newchild.elementcreationmenumodel,
org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl,
org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util,
- org.eclipse.papyrus.infra.newchild.handler,
- org.eclipse.papyrus.infra.newchild.ui
+ org.eclipse.papyrus.infra.newchild.messages,
+ org.eclipse.papyrus.infra.newchild.ui;x-friends:="org.eclipse.papyrus.infra.newchild.ui"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/plugin.xml b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/plugin.xml
index c7141b2685f..78808c787f5 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/plugin.xml
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/plugin.xml
@@ -1,96 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.papyrus.infra.newchild" name="ElementCreationMenuModel" schema="schema/org.eclipse.papyrus.infra.newchild.exsd"/>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.ui.popup.any?after=additions">
- <command
- commandId="org.eclipse.papyrus.infra.newchild.deploy"
- 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="creationmenumodel">
- </test>
- </or>
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.newchild.undeploy"
- 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="creationmenumodel">
- </test>
- </or>
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.eclipse.papyrus.infra.newchild.handler.DeployCreationMenuModelHandler"
- id="org.eclipse.papyrus.infra.newchild.deploy"
- name="Deploy Creation Menu Model">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.infra.newchild.handler.UndeployCreationMenuModelHandler"
- id="org.eclipse.papyrus.infra.newchild.undeploy"
- name="Undeploy Creation Menu Model">
- </command>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated elementCreationMenuModel -->
- <package
- uri="http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel"
- class="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage"
- genModel="resource/elementCreationMenuModel.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <!-- @generated elementCreationMenuModel -->
- <parser
- type="creationmenumodel"
- class="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util.ElementCreationMenuModelResourceFactoryImpl"/>
- </extension>
-
- <!-- COMPATIBILITY -->
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://ElementCreationMenuModel"
- class="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage"
- genModel="resource/elementCreationMenuModel.genmodel"/>
- </extension>
-</plugin>
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.papyrus.infra.newchild" name="ElementCreationMenuModel" schema="schema/org.eclipse.papyrus.infra.newchild.exsd"/>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated elementCreationMenuModel -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel"
+ class="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage"
+ genModel="resource/elementCreationMenuModel.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <!-- @generated elementCreationMenuModel -->
+ <parser
+ type="creationmenumodel"
+ class="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util.ElementCreationMenuModelResourceFactoryImpl"/>
+ </extension>
+
+ <!-- COMPATIBILITY -->
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://ElementCreationMenuModel"
+ class="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage"
+ genModel="resource/elementCreationMenuModel.genmodel"/>
+ </extension>
+</plugin>
+
+
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuRegistry.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuRegistry.java
index db994af8cf3..0a01b07449d 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuRegistry.java
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuRegistry.java
@@ -1,203 +1,429 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2016 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:
- *
- * CEA LIST - Initial API and implementation
- * Christian W. Damus (CEA) - bug 422257
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 487199
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.newchild;
-
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage;
-import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder;
-import org.eclipse.papyrus.infra.newchild.messages.Messages;
-import org.osgi.framework.Bundle;
-
-/**
- * This class is used to load all extension point call org.eclipse.papyrus.infra.newchild
- * It gives the set of all Folder that has to be displayed
- */
-public class CreationMenuRegistry {
-
- /** The registry. */
- protected static CreationMenuRegistry creationMenuRegistry;
-
- /** The extension id. */
- private final String MENU_CREATION_MODEL_EXTENSION_ID = "org.eclipse.papyrus.infra.newchild"; //$NON-NLS-1$
-
- /** The model id. */
- private final String MODEL_ID = "model"; //$NON-NLS-1$
-
- /** the folders collection. */
- private List<Folder> rootFolders = new ArrayList<Folder>();
-
- /** the resource set. */
- private static ResourceSetImpl resourceSet;
-
- /**
- * returns the singleton instance of this registry
- *
- * @return the singleton instance of this registry
- */
- public static synchronized CreationMenuRegistry getInstance() {
- if (null == creationMenuRegistry) {
- creationMenuRegistry = new CreationMenuRegistry();
- creationMenuRegistry.init();
- }
- return creationMenuRegistry;
- }
-
- /**
- * Constructor.
- */
- public CreationMenuRegistry() {
- }
-
- /**
- * this method load the extension points and initialize resource set.
- */
- public void init() {
- // Obtain a new resource set
- resourceSet = new ResourceSetImpl();
- resourceSet.getPackageRegistry().put(ElementCreationMenuModelPackage.eINSTANCE.getNsURI(), ElementCreationMenuModelPackage.eINSTANCE);
-
- // Reading data from plugins
- IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(MENU_CREATION_MODEL_EXTENSION_ID);
- for (int i = 0; i < configElements.length; i++) {
- rootFolders.add(initializeOneModel(configElements[i]));
- }
-
- }
-
- /**
- * @return the set of root folders
- */
- public List<Folder> getRootFolder() {
- return rootFolders;
- }
-
- /**
- * Load one model
- *
- * @param element
- * the extension point
- * @return the Folder
- */
- private Folder initializeOneModel(final IConfigurationElement element) {
- try {
- return createExtension(element, element.getAttribute(MODEL_ID));
-
- } catch (Exception e) {
- Activator.log.error(Messages.CreationMenuRegistry_Error_ModelCanBeLoaded, e);
- }
- return null;
- }
-
- /**
- * Load the {@link Folder} of the CreationMenuModel from the {@link URI}.
- *
- * @param uri
- * the uri of the model file to load
- * @throws Exception
- */
- public void loadCreationMenuModel(final URI uri) throws Exception {
- // unload before add it;
- unloadCreationMenuModel(uri);
- try {
- rootFolders.add(getCreationMenuModel(uri));
- } catch (URISyntaxException e) {
- throw new Exception(Messages.CreationMenuRegistry_Error_UnableToLoadCreationMenu + e);
- }
- }
-
- /**
- * Unload the {@link Folder} of the CreationMenuModel from the {@link URI}.
- * This is done by removing all {@link Folder} with the same Label.
- *
- * @param uri
- * the uri of the model file to unload
- * @throws Exception
- */
- public void unloadCreationMenuModel(final URI uri) throws Exception {
- try {
- Folder creationMenuModel = getCreationMenuModel(uri);
-
- // get all folders with the same Label
- Object[] array = rootFolders.stream().filter(f -> f.getLabel().equals(creationMenuModel.getLabel())).toArray();
-
- // Remove them from registry
- rootFolders.removeAll(Arrays.asList(array));
-
- } catch (URISyntaxException e) {
- throw new Exception(Messages.CreationMenuRegistry_Error_UnableToUnloadCreationMenu + e);
- }
- }
-
- /**
- * Load a resource instanceof ElementCreationMenuModel
- *
- * @param resourceSet
- * the resource set in which to load the menu model
- * @param element
- * the extension point
- * @param classAttribute
- * the name of the resource to load
- * @return the loaded Folder
- * @throws Exception
- * if the resource is not loaded
- */
- private static Folder createExtension(final IConfigurationElement element, final String classAttribute) throws Exception {
- Folder folder = null;
- try {
- Bundle extensionBundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
- URL url = extensionBundle.getResource(classAttribute);
- if (url != null) {
- URI uri = URI.createURI(url.toURI().toASCIIString());
- folder = getCreationMenuModel(uri);
- }
-
- } catch (URISyntaxException e) {
- throw new Exception(Messages.CreationMenuRegistry_Error_UnableToCreateExtension + e);
- }
- return folder;
- }
-
- /**
- *
- * @param uri
- * The uri of the fle of the model.
- * @return the root {@link Folder} from the model CreationMenuModel
- * @throws URISyntaxException
- */
- private static Folder getCreationMenuModel(final URI uri) throws URISyntaxException {
- Folder folder = null;
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
-
- // Get the resource
- Resource resource = resourceSet.getResource(uri, true);
- if (null != resource.getContents() && 0 < resource.getContents().size() && resource.getContents().get(0) instanceof Folder) {
- folder = (Folder) resource.getContents().get(0);
- }
-
- return folder;
- }
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 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:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 487199
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.newchild;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage;
+import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder;
+import org.eclipse.papyrus.infra.newchild.messages.Messages;
+import org.osgi.framework.Bundle;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+/**
+ * This class is used to load all extension point call org.eclipse.papyrus.infra.newchild
+ * It gives the set of all Folder that has to be displayed
+ */
+public class CreationMenuRegistry {
+
+ /** The default visibility of folders */
+ private static final boolean DEFAULT_VISIBILITY = true;
+
+ /** The registry. */
+ protected static CreationMenuRegistry creationMenuRegistry;
+
+ /** The extension id. */
+ private final String MENU_CREATION_MODEL_EXTENSION_ID = "org.eclipse.papyrus.infra.newchild"; //$NON-NLS-1$
+
+ /** The model id. */
+ private final String MODEL_ID = "model"; //$NON-NLS-1$
+
+ /** The tool id. */
+ private final String ID = "id"; //$NON-NLS-1$
+
+ /** preferences which contain visible folder */
+ private Preferences preferences;
+
+ /** the folders collection. */
+ private Map<String, Folder> rootFolders = new HashMap<>();
+
+ /** Default values of folder visibilities */
+ private Map<String, Boolean> defaultValues = new HashMap<>();
+
+ /** the resource set. */
+ private static ResourceSetImpl resourceSet;
+
+ /**
+ * returns the singleton instance of this registry
+ *
+ * @return the singleton instance of this registry
+ */
+ public static synchronized CreationMenuRegistry getInstance() {
+ if (null == creationMenuRegistry) {
+ creationMenuRegistry = new CreationMenuRegistry();
+ creationMenuRegistry.init();
+ }
+ return creationMenuRegistry;
+ }
+
+ /**
+ * Constructor.
+ */
+ public CreationMenuRegistry() {
+ }
+
+ /**
+ * this method load the extension points and initialize resource set.
+ */
+ public void init() {
+ // Obtain a new resource set
+ resourceSet = new ResourceSetImpl();
+ resourceSet.getPackageRegistry().put(ElementCreationMenuModelPackage.eINSTANCE.getNsURI(), ElementCreationMenuModelPackage.eINSTANCE);
+
+ // Preference init
+ preferences = ConfigurationScope.INSTANCE.getNode(Activator.PLUGIN_ID);
+
+ // Reading data from plugins
+ IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(MENU_CREATION_MODEL_EXTENSION_ID);
+ for (int i = 0; i < configElements.length; i++) {
+ initializeOneModel(configElements[i]);
+ }
+
+ }
+
+ /**
+ * @return the set of root folders
+ */
+ public List<Folder> getRootFolder() {
+ return new ArrayList<>(rootFolders.values());
+ }
+
+ /**
+ * Return the id of the folder if is loaded.
+ */
+ public String getFolderId(Folder folder) {
+ String id = "";//$NON-NLS-1$
+
+ Iterator<Entry<String, Folder>> entrySet = rootFolders.entrySet().iterator();
+ while (entrySet.hasNext()) {
+ Entry<String, Folder> entry = entrySet.next();
+ if (folder.equals(entry.getValue())) {
+ id = entry.getKey();
+ }
+ }
+
+ return id;
+ }
+
+ /**
+ * Load one model.
+ *
+ * @param element
+ * the extension point
+ * @return the Folder
+ */
+ private Folder initializeOneModel(final IConfigurationElement element) {
+ Folder folder = null;
+ try {
+ folder = createExtension(element, element.getAttribute(MODEL_ID));
+ } catch (Exception e) {
+ Activator.log.error(Messages.CreationMenuRegistry_Error_ModelCanBeLoaded, e);
+ }
+ return folder;
+ }
+
+ /**
+ * Load the {@link Folder} of the CreationMenuModel from the {@link URI}.
+ *
+ * @param uri
+ * the uri of the model file to load
+ * @throws Exception
+ */
+ public void loadCreationMenuModel(final URI uri) throws Exception {
+ // unload before add it;
+ unloadCreationMenuModel(uri);
+ try {
+ Folder folder = getCreationMenuModel(uri);
+ String creationMenuId = getCreationMenuId(uri);
+ rootFolders.put(creationMenuId, folder);
+ defaultValues.put(creationMenuId, folder.isVisible());
+
+ folder.setVisible(getPreferedVisibility(uri, DEFAULT_VISIBILITY));
+
+ } catch (URISyntaxException e) {
+ throw new Exception(Messages.CreationMenuRegistry_Error_UnableToLoadCreationMenu + e);
+ }
+ }
+
+ /**
+ * Unload the {@link Folder} of the CreationMenuModel from the {@link URI}.
+ * This is done by removing all {@link Folder} with the same Label.
+ *
+ * @param uri
+ * the uri of the model file to unload
+ * @throws Exception
+ */
+ public void unloadCreationMenuModel(final URI uri) throws Exception {
+ String creationMenuModelId = getCreationMenuId(uri);
+
+ rootFolders.remove(creationMenuModelId);
+ defaultValues.remove(creationMenuModelId);
+ preferences.remove(creationMenuModelId);
+ }
+
+ /**
+ * Load a resource instanceof ElementCreationMenuModel
+ *
+ * @param resourceSet
+ * the resource set in which to load the menu model
+ * @param element
+ * the extension point
+ * @param classAttribute
+ * the name of the resource to load
+ * @return the loaded Folder
+ * @throws Exception
+ * if the resource is not loaded
+ */
+ private Folder createExtension(final IConfigurationElement element, final String classAttribute) throws Exception {
+ Folder folder = null;
+ try {
+ Bundle extensionBundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
+ URL url = extensionBundle.getResource(classAttribute);
+ if (null != url) {
+ URI uri = URI.createURI(url.toURI().toASCIIString());
+
+ String creationMenuId = getCreationMenuId(uri);
+ folder = getCreationMenuModel(uri);
+ defaultValues.put(creationMenuId, folder.isVisible());
+
+ String visible = preferences.get(creationMenuId, "true"); //$NON-NLS-1$
+ folder.setVisible(Boolean.valueOf(visible));
+
+ rootFolders.put(creationMenuId, folder);
+ }
+
+ } catch (URISyntaxException e) {
+ throw new Exception(Messages.CreationMenuRegistry_Error_UnableToCreateExtension + e);
+ }
+ return folder;
+ }
+
+ /**
+ * Get the creation menu id from a {@link URI}.
+ */
+ public String getCreationMenuId(URI uri) {
+
+ // FileLocator.resolve(url)(url).getPath();
+
+ String bundleId = "";//$NON-NLS-1$
+ String relativePath = "";//$NON-NLS-1$
+ String fileName = uri.lastSegment();
+
+ try {
+ // Bundle id
+ URL url = new URL(uri.toString());
+ String absolutePath = FileLocator.resolve(url).getPath();
+ String replace = absolutePath.replace(url.getPath(), "");//$NON-NLS-1$
+ int lastIndexOf = replace.lastIndexOf("/");//$NON-NLS-1$
+ bundleId = replace.substring(lastIndexOf + 1, replace.length());
+ // relative path
+ relativePath = url.getPath().replace(fileName, "");//$NON-NLS-1$
+ } catch (MalformedURLException e) {
+ Activator.log.error(e);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(fileName);
+ stringBuilder.append(" - ");//$NON-NLS-1$
+ stringBuilder.append(bundleId);
+ stringBuilder.append(relativePath);
+
+ return stringBuilder.toString();
+ }
+
+ /**
+ * @param uri
+ * The uri of the file of the model.
+ * @return the root {@link Folder} from the model CreationMenuModel.
+ * @throws URISyntaxException
+ */
+ private Folder getCreationMenuModel(final URI uri) throws URISyntaxException {
+ Folder folder = null;
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
+
+ // Get the resource
+ Resource resource = resourceSet.getResource(uri, true);
+ if (null != resource.getContents() && 0 < resource.getContents().size() && resource.getContents().get(0) instanceof Folder) {
+ folder = (Folder) resource.getContents().get(0);
+ }
+
+ return folder;
+ }
+
+ /**
+ * Set the visibility of a menu by its id.
+ *
+ * @param id
+ * The id.
+ * @param visibility
+ * The visibility to set.
+ */
+ public void setCreationMenuVisibility(final String id, final Boolean visibility) {
+ preferences.put(id, String.valueOf(visibility));
+ rootFolders.get(id).setVisible(visibility);
+ try {
+ // forces the application to save the preferences
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ /**
+ * Set the creation menu visibility by its folder model.
+ *
+ * @param folder
+ * The folder.
+ * @param visibility
+ * The visibility to set.
+ */
+ public void setCreationMenuVisibility(final Folder folder, final Boolean visibility) {
+ Set<Entry<String, Folder>> entrySet = rootFolders.entrySet();
+
+ for (Entry<String, Folder> entry : entrySet) {
+ if (folder.equals(entry.getValue())) {
+ setCreationMenuVisibility(entry.getKey(), visibility);
+ }
+ }
+ }
+
+ /**
+ * Gets the visibility of a {@link Folder}.
+ *
+ * @param folder
+ * The folder.
+ * @return The current visibility of the folder.
+ */
+ public boolean getCreationMenuVisibility(final Folder folder) {
+ String visible = preferences.get(getFolderId(folder), "");//$NON-NLS-1$
+ return "" == visible ? folder.isVisible() : Boolean.valueOf(visible);//$NON-NLS-1$
+ }
+
+ /**
+ * Gets the visibility of a {@link Folder} refereed by its URI.
+ *
+ * @param folder
+ * The folder.
+ * @return The current visibility of the folder.
+ */
+ public boolean getCreationMenuVisibility(final URI uri) {
+ Folder folder = null;
+ try {
+ folder = getCreationMenuModel(uri);
+ } catch (URISyntaxException e) {
+ Activator.log.error(e);
+ }
+ String visible = preferences.get(getCreationMenuId(uri), "");//$NON-NLS-1$
+ return "" == visible ? folder.isVisible() : Boolean.valueOf(visible);//$NON-NLS-1$
+ }
+
+ /**
+ * Gets the default value of a {@link Folder}.
+ *
+ * @param folder
+ * The folder
+ * @return The default visibility of the folder.
+ */
+ public boolean getDefaultCreationMenuVisibility(final Folder folder) {
+ Boolean defaultVisibility = defaultValues.get(getFolderId(folder));
+ return null != defaultVisibility ? defaultVisibility : folder.isVisible();
+ }
+
+ /**
+ * Gets the default value of a {@link Folder} refereed by its URI.
+ *
+ * @param folder
+ * The folder
+ * @return The default visibility of the folder.
+ */
+ public boolean getDefaultCreationMenuVisibility(final URI uri) {
+ Folder folder = null;
+ try {
+ folder = getCreationMenuModel(uri);
+ } catch (URISyntaxException e) {
+ Activator.log.error(e);
+ }
+ return getDefaultCreationMenuVisibility(folder);
+ }
+
+ /**
+ * Gets the visibility of the {@link Folder} set in preferences.
+ *
+ * @param folder
+ * The folder.
+ * @param defautVisibility
+ * The default visibility if it is not set in preferences.
+ * @return
+ * The preferred visibility.
+ */
+ public boolean getPreferedVisibility(final Folder folder, final boolean defautVisibility) {
+ String visible = preferences.get(getFolderId(folder), String.valueOf(defautVisibility));
+ return Boolean.valueOf(visible);
+ }
+
+ /**
+ * Gets the visibility of the {@link Folder} refereed by its URI set in preferences.
+ *
+ * @param folder
+ * The folder.
+ * @param defautVisibility
+ * The default visibility if it is not set in preferences.
+ * @return
+ * The preferred visibility.
+ */
+ public boolean getPreferedVisibility(final URI uri, final boolean defautVisibility) {
+ String visible = preferences.get(getCreationMenuId(uri), String.valueOf(defautVisibility));
+ return Boolean.valueOf(visible);
+ }
+
+ /**
+ * Restore the default visibility value of folders.
+ */
+ public void restoreDefault() {
+ try {
+ preferences.clear();
+ } catch (BackingStoreException e) {
+ Activator.log.error(e);
+ }
+ Set<Entry<String, Folder>> entrySet = rootFolders.entrySet();
+ for (Entry<String, Folder> entry : entrySet) {
+ Folder folder = entry.getValue();
+ folder.setVisible(getDefaultCreationMenuVisibility(folder));
+ }
+ }
+
} \ No newline at end of file
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.classpath b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.classpath
new file mode 100644
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.project b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.project
new file mode 100644
index 00000000000..254c8d49648
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.newchild.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..56b5e74c2b2
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,310 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..663c1aa1e65
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,126 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * Constructor.\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\r\n * Copyright (c) ${year} CEA LIST and others.\r\n * \r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * CEA LIST - Initial API and implementation\r\n * \r\n *****************************************************************************/\r\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * ${see_to_overridden}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${see_to_target}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 00000000000..23fb95e120f
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/META-INF/MANIFEST.MF b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..a5201240e99
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.newchild.ui;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.newchild.ui.Activator
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.newchild;bundle-version="[1.2.0,2.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-Description: %pluginDescription
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/about.html b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/build.properties b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/build.properties
new file mode 100644
index 00000000000..9cbab3c135e
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.properties b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.properties
new file mode 100644
index 00000000000..9f2294986a7
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2013 CEA LIST
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Patrick Tessier (CEA LIST) - Initial API and implementation
+##################################################################################
+pluginName=Papyrus infra new child ui
+providerName=Eclipse Modeling Project
+
+pluginDescription=This is the plug in of the new child ui.
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.xml b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.xml
new file mode 100644
index 00000000000..221916a95c5
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/plugin.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <command
+ commandId="org.eclipse.papyrus.infra.newchild.deploy"
+ 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="creationmenumodel">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.infra.newchild.undeploy"
+ 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="creationmenumodel">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.papyrus.infra.newchild.ui.handler.DeployCreationMenuModelHandler"
+ id="org.eclipse.papyrus.infra.newchild.deploy"
+ name="Deploy Creation Menu Model">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.infra.newchild.ui.handler.UndeployCreationMenuModelHandler"
+ id="org.eclipse.papyrus.infra.newchild.undeploy"
+ name="Undeploy Creation Menu Model">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
+ class="org.eclipse.papyrus.infra.newchild.ui.preferences.Preferences"
+ id="org.eclipse.papyrus.infra.newchild.preferences"
+ name="New Child">
+ </page>
+ </extension>
+
+
+
+ <!-- COMPATIBILITY -->
+</plugin>
+
+
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/pom.xml b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/pom.xml
new file mode 100644
index 00000000000..b2ef0f39e82
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.infra-ui</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.newchild.ui</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/Activator.java b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/Activator.java
new file mode 100644
index 00000000000..8cd7ca20c96
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/Activator.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.newchild.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.newchild.ui"; //$NON-NLS-1$
+
+ /** The shared instance */
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/handler/DeployCreationMenuModelHandler.java b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/handler/DeployCreationMenuModelHandler.java
index c52a652b66e..a7c7ce80721 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/handler/DeployCreationMenuModelHandler.java
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/handler/DeployCreationMenuModelHandler.java
@@ -8,9 +8,8 @@
*
* Contributors:
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation - bug 487199
- *
*****************************************************************************/
-package org.eclipse.papyrus.infra.newchild.handler;
+package org.eclipse.papyrus.infra.newchild.ui.handler;
import java.util.Iterator;
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/handler/UndeployCreationMenuModelHandler.java b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/handler/UndeployCreationMenuModelHandler.java
index a91e7cb382a..a421213cb9f 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/handler/UndeployCreationMenuModelHandler.java
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/handler/UndeployCreationMenuModelHandler.java
@@ -10,7 +10,7 @@
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation - bug 487199
*
*****************************************************************************/
-package org.eclipse.papyrus.infra.newchild.handler;
+package org.eclipse.papyrus.infra.newchild.ui.handler;
import java.util.Iterator;
@@ -119,7 +119,7 @@ public class UndeployCreationMenuModelHandler extends AbstractHandler {
monitor.subTask(Messages.UndeployCreationMenuModelHandler_SubTaskTitle_ResetRegistry);
try {
- CreationMenuRegistry.getInstance().unloadCreationMenuModel(emfURI);
+ CreationMenuRegistry.getInstance().unloadCreationMenuModel(URI.createURI(selectedFile.getLocationURI().toASCIIString()));
monitor.worked(1);
result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.UndeployCreationMenuModelHandler_SuccessfullyUndeployed + fileName));
} catch (Exception e) {
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/preferences/Preferences.java b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/preferences/Preferences.java
new file mode 100644
index 00000000000..94df4dc7fcb
--- /dev/null
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.newchild.ui/src/org/eclipse/papyrus/infra/newchild/ui/preferences/Preferences.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.newchild.ui.preferences;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.papyrus.infra.newchild.CreationMenuRegistry;
+import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Preferences page for new child contributions to set there visibility.
+ */
+public class Preferences extends PreferencePage implements IWorkbenchPreferencePage {
+
+ /** The map of the checkboxes related to folders */
+ private Map<Folder, Button> checkboxes = new HashMap<>();
+
+ /** The map of modification on Folders. */
+ private Map<Folder, Boolean> folders = new HashMap<>();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ // Nothing
+ }
+
+ /**
+ * Creation of the list of new child contribution.<br>
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite self = new Composite(parent, SWT.NONE);
+ self.setLayout(new GridLayout(1, false));
+ self.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ createHeaderContents(self);
+
+ Label label = new Label(self, SWT.NONE);
+ label.setText("New Child:");
+
+ CreationMenuRegistry creationMenuInstance = CreationMenuRegistry.getInstance();
+ List<Folder> rootFolders = creationMenuInstance.getRootFolder();
+
+ for (Folder folder : rootFolders) {
+ boolean applied = folder.isVisible();
+ Button checkbox = new Button(self, SWT.CHECK);
+
+ checkbox.setText(creationMenuInstance.getFolderId(folder));
+ checkbox.setSelection(applied);
+
+ final Folder theFolder = folder;
+ checkbox.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean applied = ((Button) e.widget).getSelection();
+ folders.put(theFolder, applied);
+ }
+
+ });
+ checkboxes.put(folder, checkbox);
+ }
+
+ createFooterContents(self);
+
+ return null;
+ }
+
+ /**
+ * Overridden by subclasses to create optional header content above the
+ * list of context check-boxes.
+ *
+ * @param parent
+ * the parent composite
+ */
+ protected void createHeaderContents(Composite parent) {
+ // Pass
+ }
+
+ /**
+ * Overridden by subclasses to create optional footer content below the
+ * list of context check-boxes.
+ *
+ * @param parent
+ * the parent composite
+ */
+ protected void createFooterContents(Composite parent) {
+ // Pass
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ return saveChanges();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#performApply()
+ */
+ @Override
+ public void performApply() {
+ saveChanges();
+ }
+
+ /**
+ * Save changes.
+ */
+ public boolean saveChanges() {
+ for (Entry<Folder, Boolean> folderEntry : folders.entrySet()) {
+ CreationMenuRegistry.getInstance().setCreationMenuVisibility(folderEntry.getKey(), folderEntry.getValue());
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+ */
+ @Override
+ public void performDefaults() {
+ CreationMenuRegistry.getInstance().restoreDefault();
+ List<Folder> rootFolder = CreationMenuRegistry.getInstance().getRootFolder();
+ folders.clear();
+ for (Folder folder : rootFolder) {
+ Button button = checkboxes.get(folder);
+ button.setSelection(folder.isVisible());
+ }
+ }
+
+}
diff --git a/plugins/infra/ui/pom.xml b/plugins/infra/ui/pom.xml
index 589c9e1afcd..f9cec6ab2b3 100644
--- a/plugins/infra/ui/pom.xml
+++ b/plugins/infra/ui/pom.xml
@@ -17,5 +17,6 @@
<module>org.eclipse.papyrus.infra.onefile.ui</module>
<module>org.eclipse.papyrus.infra.widgets</module>
<module>org.eclipse.papyrus.infra.widgets.toolbox</module>
+ <module>org.eclipse.papyrus.infra.newchild.ui</module>
</modules>
</project>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project
new file mode 100644
index 00000000000..0b0f4c1b18c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild/plugin.xml b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild/plugin.xml
index 53e367f68db..b67a6549b03 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild/plugin.xml
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild/plugin.xml
@@ -17,7 +17,7 @@
category="org.eclipse.papyrus.views.modelexplorer.preferences.NavigatorPreferencePage"
class="org.eclipse.papyrus.views.modelexplorer.newchild.preferences.NewChildPreferencePage"
id="org.eclipse.papyrus.views.modelexplorer.preferences.selection"
- name="New Child Menu Preferences...">
+ name="New Child Menu">
</page>
</extension>
<extension

Back to the top