Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorptessier2013-12-09 12:54:58 +0000
committerptessier2013-12-09 12:54:58 +0000
commitfd81cd4859586c05ed55a10a01dd263ff0008525 (patch)
treeea191ca10d4c610215b3df21f5fd4916555d49ac /tests
parent10b262a6d543fed1b9e5f0f4501dd375f9a0a6d9 (diff)
downloadorg.eclipse.papyrus-fd81cd4859586c05ed55a10a01dd263ff0008525.tar.gz
org.eclipse.papyrus-fd81cd4859586c05ed55a10a01dd263ff0008525.tar.xz
org.eclipse.papyrus-fd81cd4859586c05ed55a10a01dd263ff0008525.zip
351803: [New Child] Papyrus shall provide a customizable "New Child"
menu https://bugs.eclipse.org/bugs/show_bug.cgi?id=351803
Diffstat (limited to 'tests')
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.classpath7
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.project28
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/META-INF/MANIFEST.MF11
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/SysMLAndSampleUML.xmi21
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/TestSampleUML.xmi32
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/about.html28
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/build.properties5
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/M.gifbin0 -> 912 bytes
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/O.gifbin0 -> 912 bytes
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/Values.gifbin0 -> 361 bytes
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.properties12
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.xml14
-rw-r--r--tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/src/org/eclipse/papyrus/infra/newchild/test/Activator.java50
14 files changed, 215 insertions, 0 deletions
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.classpath b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.project b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.project
new file mode 100644
index 00000000000..46f5a161cf8
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.newchild.test</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>
+ </natures>
+</projectDescription>
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.settings/org.eclipse.jdt.core.prefs b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/META-INF/MANIFEST.MF b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..79e83bf7a7a
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: NewChildTest
+Bundle-SymbolicName: org.eclipse.papyrus.infra.newchild.test;singleton:=true
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.newchild.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.newchild;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/SysMLAndSampleUML.xmi b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/SysMLAndSampleUML.xmi
new file mode 100644
index 00000000000..6220960d81b
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/SysMLAndSampleUML.xmi
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ASCII"?>
+<ElementCreationMenuModel:Folder
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ElementCreationMenuModel="http://ElementCreationMenuModel"
+ xsi:schemaLocation="http://ElementCreationMenuModel ../../../org.eclipse.papyrus.infra.newchild/resource/elementCreationMenuModel.ecore"
+ label="MixedTest">
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Package"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Package"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Class"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Class"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="MyClass"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Class"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Block"
+ elementTypeIdRef="org.eclipse.papyrus.sysml.Block"/>
+</ElementCreationMenuModel:Folder>
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/TestSampleUML.xmi b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/TestSampleUML.xmi
new file mode 100644
index 00000000000..6c09c894f92
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/TestModel/TestCreateModifyElementCreationModel/TestSampleUML.xmi
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<ElementCreationMenuModel:Folder
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ElementCreationMenuModel="http://ElementCreationMenuModel"
+ xsi:schemaLocation="http://ElementCreationMenuModel ../../../org.eclipse.papyrus.infra.newchild/resource/elementCreationMenuModel.ecore"
+ label="SimpleUMLTest">
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Package"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.newchild.test/icon/O.gif"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Package"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Class"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Class"/>
+ <menu xsi:type="ElementCreationMenuModel:Folder"
+ label="ElementWithFeature"
+ icon="">
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="NestedClass"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.newchild.test/icon/M.gif"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Class"
+ role="nestedClassifier"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Integer"
+ elementTypeIdRef="org.eclipse.papyrus.uml.LiteralInteger"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="MyActivity"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.newchild.test/icon/O.gif"
+ elementTypeIdRef="org.eclipse.papyrus.uml.Activity"/>
+ </menu>
+</ElementCreationMenuModel:Folder>
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/about.html b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/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/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/build.properties b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/build.properties
new file mode 100644
index 00000000000..6f20375d6c7
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/M.gif b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/M.gif
new file mode 100644
index 00000000000..f9a5b239d6c
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/M.gif
Binary files differ
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/O.gif b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/O.gif
new file mode 100644
index 00000000000..e6ce0916227
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/O.gif
Binary files differ
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/Values.gif b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/Values.gif
new file mode 100644
index 00000000000..f1f019535ea
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/icon/Values.gif
Binary files differ
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.properties b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.properties
new file mode 100644
index 00000000000..199d38a1363
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2012 Cedric Dumoulin.
+# 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:
+# Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+##################################################################################
+pluginName=Papyrus EMF Tests (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.xml b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.xml
new file mode 100644
index 00000000000..6785e5ae25e
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.newchild">
+ <menuCreationModel
+ model="TestModel/TestCreateModifyElementCreationModel/TestSampleUML.xmi">
+ </menuCreationModel>
+ <menuCreationModel
+ model="TestModel/TestCreateModifyElementCreationModel/SysMLAndSampleUML.xmi">
+ </menuCreationModel>
+ </extension>
+
+</plugin>
diff --git a/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/src/org/eclipse/papyrus/infra/newchild/test/Activator.java b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/src/org/eclipse/papyrus/infra/newchild/test/Activator.java
new file mode 100644
index 00000000000..6832ff2fb47
--- /dev/null
+++ b/tests/recipes/plugins/infra/org.eclipse.papyrus.infra.newchild.test/src/org/eclipse/papyrus/infra/newchild/test/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.infra.newchild.test;
+
+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.test"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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;
+ }
+
+}

Back to the top