diff options
17 files changed, 0 insertions, 959 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.classpath b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.project b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.project deleted file mode 100644 index 2a9eddc275d..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.paletteconfiguration.tests</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/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d11fadad096..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Oct 27 15:30:49 CEST 2010
-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/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/ExtendedPluginPaletteProviderTests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/ExtendedPluginPaletteProviderTests.launch deleted file mode 100644 index e2ec300248c..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/ExtendedPluginPaletteProviderTests.launch +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bad_container_name" value="\org.eclipse.papyrus.paletteconfiguration.tests\launcher"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.paletteconfiguration.tests"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.papyrus.paletteconfiguration.tests"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.paletteconfiguration.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="true"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 9641ac97c27..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0", - org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0", - org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0", - org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.7.0", - org.eclipse.papyrus.uml.diagram.paletteconfiguration;bundle-version="1.0.0", - org.eclipse.gef;bundle-version="3.9.100", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0" -Bundle-Vendor: Eclipse Modeling Project -Bundle-Version: 1.0.0.qualifier -Bundle-Name: Tests fragment for palette configuration plugin -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.papyrus.paletteconfiguration.tests;si - ngleton:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy - diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/about.html b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!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 ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") 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/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/build.properties b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/build.properties deleted file mode 100644 index 8cef9b02741..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - icons/,\ - model/,\ - plugin.xml,\ - about.html diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/icons/debug.gif b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/icons/debug.gif Binary files differdeleted file mode 100644 index ac5431fa311..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/icons/debug.gif +++ /dev/null diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/icons/testIcon.png b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/icons/testIcon.png Binary files differdeleted file mode 100644 index be8651ef953..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/icons/testIcon.png +++ /dev/null diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.extendedtypes b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.extendedtypes deleted file mode 100644 index b305b732476..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.extendedtypes +++ /dev/null @@ -1,194 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<extendedtypes:ExtendedElementTypeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:applystereotypeactionconfiguration="http://www.eclipse.org/papyrus/diagram/types/applystereotypeactionconfiguration/0.7" xmlns:configuration="http://www.eclipse.org/papyrus/core/queries/0.7" xmlns:extendedtypes="http://www.eclipse.org/papyrus/diagram/types/extendedtypes/0.7" xmlns:modifysemanticvaluesactionconfiguration="http://www.eclipse.org/papyrus/diagram/types/modifysemanticvaluesactionconfiguration/0.8" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" id="test1.palette">
- <elementType name="Metaclass " id="org.eclipse.papyrus.uml.extended.tests.Class_2008_Metaclass" hint="2008" preValidation="configuration:ModiscoQueryConfiguration platform:/plugin/org.eclipse.papyrus.core.queries.test/resources/IsNameLongerThanQueryConfiguration1.configuration#/">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_2008</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- <featuresToSet featureName="visibility">
- <value xsi:type="modifysemanticvaluesactionconfiguration:DynamicValue"/>
- </featuresToSet>
- </postAction>
- <postAction xsi:type="applystereotypeactionconfiguration:ApplyStereotypeActionConfiguration">
- <stereotypesToApply stereotypeQualifiedName="Standard::Metaclass" updateName="true">
- <requiredProfiles>Standard</requiredProfiles>
- </stereotypesToApply>
- </postAction>
- </elementType>
- <elementType name="TestClass1ExtendedElementType " id="org.eclipse.papyrus.uml.extended.tests.Class_3004_Metaclass" hint="3004" preValidation="configuration:ModiscoQueryConfiguration platform:/plugin/org.eclipse.papyrus.core.queries.test/resources/IsNameLongerThanQueryConfiguration1.configuration#/">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3004</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- <featuresToSet featureName="visibility">
- <value xsi:type="modifysemanticvaluesactionconfiguration:DynamicValue"/>
- </featuresToSet>
- </postAction>
- <postAction xsi:type="applystereotypeactionconfiguration:ApplyStereotypeActionConfiguration">
- <stereotypesToApply stereotypeQualifiedName="Standard::Metaclass" updateName="true">
- <requiredProfiles>Standard</requiredProfiles>
- </stereotypesToApply>
- </postAction>
- </elementType>
- <elementType name="TestClass1ExtendedElementType " id="org.eclipse.papyrus.uml.extended.tests.Class_3008_Metaclass" hint="3008" preValidation="configuration:ModiscoQueryConfiguration platform:/plugin/org.eclipse.papyrus.core.queries.test/resources/IsNameLongerThanQueryConfiguration1.configuration#/">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3008</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- <featuresToSet featureName="visibility">
- <value xsi:type="modifysemanticvaluesactionconfiguration:DynamicValue"/>
- </featuresToSet>
- </postAction>
- <postAction xsi:type="applystereotypeactionconfiguration:ApplyStereotypeActionConfiguration">
- <stereotypesToApply stereotypeQualifiedName="Standard::Metaclass" updateName="true">
- <requiredProfiles>Standard</requiredProfiles>
- </stereotypesToApply>
- </postAction>
- </elementType>
- <elementType name="TestClass1ExtendedElementType " id="org.eclipse.papyrus.uml.extended.tests.Class_3010_Metaclass" hint="3010" preValidation="configuration:ModiscoQueryConfiguration platform:/plugin/org.eclipse.papyrus.core.queries.test/resources/IsNameLongerThanQueryConfiguration1.configuration#/">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3010</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- <featuresToSet featureName="visibility">
- <value xsi:type="modifysemanticvaluesactionconfiguration:DynamicValue"/>
- </featuresToSet>
- </postAction>
- <postAction xsi:type="applystereotypeactionconfiguration:ApplyStereotypeActionConfiguration">
- <stereotypesToApply stereotypeQualifiedName="Standard::Metaclass" updateName="true">
- <requiredProfiles>Standard</requiredProfiles>
- </stereotypesToApply>
- </postAction>
- </elementType>
- <elementType name="TestClass1ExtendedElementType " id="org.eclipse.papyrus.uml.extended.tests.Class_3014_Metaclass" hint="3014" preValidation="configuration:ModiscoQueryConfiguration platform:/plugin/org.eclipse.papyrus.core.queries.test/resources/IsNameLongerThanQueryConfiguration1.configuration#/">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3014</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- <featuresToSet featureName="visibility">
- <value xsi:type="modifysemanticvaluesactionconfiguration:DynamicValue"/>
- </featuresToSet>
- </postAction>
- <postAction xsi:type="applystereotypeactionconfiguration:ApplyStereotypeActionConfiguration">
- <stereotypesToApply stereotypeQualifiedName="Standard::Metaclass" updateName="true">
- <requiredProfiles>Standard</requiredProfiles>
- </stereotypesToApply>
- </postAction>
- </elementType>
- <elementType name="TestAbstractClassExtendedElementType2008" id="org.eclipse.papyrus.uml.extended.tests.Class_2008_Abstract" hint="2008" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Class_2008">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- </elementType>
- <elementType name="TestAbstractClassExtendedElementType3004" id="org.eclipse.papyrus.uml.extended.tests.Class_3004_Abstract" hint="3004" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Class_3004">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- </elementType>
- <elementType name="TestAbstractClassExtendedElementType3008" id="org.eclipse.papyrus.uml.extended.tests.Class_3008_Abstract" hint="3008" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Class_3008">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- </elementType>
- <elementType name="TestAbstractClassExtendedElementType3010" id="org.eclipse.papyrus.uml.extended.tests.Class_3010_Abstract" hint="3010" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Class_3010">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- </elementType>
- <elementType name="TestAbstractClassExtendedElementType3014" id="org.eclipse.papyrus.uml.extended.tests.Class_3014_Abstract" hint="3014" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Class_3014">
- <iconEntry iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- </elementType>
- <elementType name="TestDependencyExtendedElementType2014" id="org.eclipse.papyrus.uml.extended.tests.Dependency_2014_Abstract" hint="2014" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014">
- <iconEntry iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
- <!--
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- -->
- </elementType>
- <elementType name="TestDependencyExtendedElementType4008" id="org.eclipse.papyrus.uml.extended.tests.Dependency_4008_Abstract" hint="4008" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008">
- <iconEntry iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
- <!--
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
- -->
- </elementType>
- <!--
- <elementType name="TestDependencyExtendedElementType4018" id="org.eclipse.papyrus.uml.extended.tests.Dependency_4018_Abstract" hint="4018" specializedDiagramTypeID="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018">
- <iconEntry iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
-
- <postAction xsi:type="modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- </postAction>
-
- </elementType>
- -->
-</extendedtypes:ExtendedElementTypeSet>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.modifysemanticvaluesactionconfiguration b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.modifysemanticvaluesactionconfiguration deleted file mode 100644 index f99ecedf351..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.modifysemanticvaluesactionconfiguration +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modifysemanticvaluesactionconfiguration="http://www.eclipse.org/papyrus/diagram/types/modifysemanticvaluesactionconfiguration/0.8" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" label="Test1 Class" id="Test1.class">
- <featuresToSet featureName="isAbstract">
- <value xsi:type="modifysemanticvaluesactionconfiguration:ConstantValue">
- <valueInstance xsi:type="uml:LiteralBoolean" value="true"/>
- </value>
- </featuresToSet>
- <featuresToSet featureName="visibility">
- <value xsi:type="modifysemanticvaluesactionconfiguration:DynamicValue"/>
- </featuresToSet>
-</modifysemanticvaluesactionconfiguration:ModifySemanticValuesActionConfiguration>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.paletteconfiguration b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.paletteconfiguration deleted file mode 100644 index 9af3663e881..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/model/Test1.paletteconfiguration +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" id="org.eclipse.papyrus.paletteconfiguration.tests.tests.palettetest1" label="PaletteTest1" description="Test palette for the palette configuration plugin"> - <icon pluginID="org.eclipse.papyrus.paletteconfiguration.tests" iconPath="/icons/debug.gif"/> - <drawerConfigurations id="palettetest1.drawer1" label="Drawer1" description="First drawer for palette configuration test1"> - <icon pluginID="org.eclipse.papyrus.paletteconfiguration.tests" iconPath="/icons/debug.gif"/> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettetest1.tool0" label="MetaClass" description="Test - Metaclass"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_2008_Metaclass"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3008_Metaclass"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3004_Metaclass"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3010_Metaclass"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3014_Metaclass"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettetest2.class" label="Abstract Class" description="test - UML Abstract Class"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_2008_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3004_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3008_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3010_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3014_Abstract"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:StackConfiguration" id="palettetest1.stack1" label="Stack 1" description="test Stack"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettetest1.operation" label="Operation" description="Test - UML Operation"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.diagram.clazz.Operation_3003"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.diagram.clazz.Operation_3007"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.diagram.clazz.Operation_3013"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.diagram.clazz.Operation_3019"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettetest1.property" label="Property" description="test - UML Property"/> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettetest1.class" label="Class" description="test - UML Class"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_2008_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3004_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3008_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3010_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Class_3014_Abstract"/> - </ownedConfigurations> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettetest1.tool3" label="Dependency" description="Test - Extended Dependency" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Dependency_2014_Abstract"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Dependency_4008_Abstract"/> - <!--<elementDescriptors elementTypeId="org.eclipse.papyrus.uml.extended.tests.Dependency_4018_Abstract"/>--> - </ownedConfigurations> - </drawerConfigurations> -</paletteconfiguration:PaletteConfiguration> diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/plugin.xml b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/plugin.xml deleted file mode 100644 index 91bf862e110..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/plugin.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<fragment> - <extension - id="org.eclipse.papyrus.paletteconfiguration.tests.test1" - name="Test PaletteConfiguration provider with file Test1.paletteConfiguration" - point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"> - <paletteDefinition - ID="org.eclipse.papyrus.paletteconfiguration.tests.test1" - class="org.eclipse.papyrus.uml.diagram.common.service.ExtendedPluginPaletteProvider" - icon="icons/debug.gif" - name="Test PaletteConfiguration provider with file Test1.paletteConfiguration" - path="/model/Test1.paletteConfiguration" - provider="CEA LIST"> - <Priority - name="Lowest"> - </Priority> - <editor - id="org.eclipse.papyrus.uml.diagram.clazz"> - </editor> - </paletteDefinition> - </extension> - <extension - point="org.eclipse.papyrus.infra.extendedtypes.extendedElementTypeSet"> - <extendedTypesSet - description="Test - extended types for UML" - icon="icons/debug.gif" - name="Test - Class diagram Test types" - path="model/Test1.extendedtypes" - id="test1.palette"> - </extendedTypesSet> - </extension> -</fragment> diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/EXtendedPluginPaletteProviderTests_PapyrusService.java b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/EXtendedPluginPaletteProviderTests_PapyrusService.java deleted file mode 100644 index ed7ec7c5b3b..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/EXtendedPluginPaletteProviderTests_PapyrusService.java +++ /dev/null @@ -1,137 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.paletteconfiguration.tests; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashMap; -import java.util.List; - -import org.eclipse.gef.palette.PaletteRoot; -import org.eclipse.gmf.runtime.common.core.service.IProvider; -import org.eclipse.gmf.runtime.common.core.service.Service; -import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry; -import org.eclipse.gmf.runtime.gef.ui.internal.palette.PaletteStack; -import org.eclipse.papyrus.uml.diagram.common.service.ExtendedPluginPaletteProvider; -import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/** - * Tests the usage of the extended palette provider in the {@link PapyrusPaletteService} - */ -public class EXtendedPluginPaletteProviderTests_PapyrusService implements ITestConstants { - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - } - - /** - * @throws java.lang.Exception - */ - @Before - public void setUp() throws Exception { - } - - /** - * @throws java.lang.Exception - */ - @After - public void tearDown() throws Exception { - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#contributeToPalette(org.eclipse.ui.IEditorPart, java.lang.Object, org.eclipse.gef.palette.PaletteRoot, java.util.Map)} - * . - */ - @Test - public final void testContributeToPalette() { - List<? extends Service.ProviderDescriptor> descriptors = PapyrusPaletteService.getInstance().getProviders(); - - ExtendedPluginPaletteProvider extendedProvider = null; - // check the test descriptor is in the list - for(Service.ProviderDescriptor descriptor : descriptors) { - IProvider provider = descriptor.getProvider(); - if(provider instanceof ExtendedPluginPaletteProvider) { - ExtendedPluginPaletteProvider extendedPluginPaletteProvider = (ExtendedPluginPaletteProvider)provider; - List<PaletteConfiguration> contributions = extendedPluginPaletteProvider.getContributions(); - if(contributions != null && !contributions.isEmpty()) { - String id = contributions.get(0).getId(); - if(PALETTE_TEST1_ID.equals(id)) { - extendedProvider = extendedPluginPaletteProvider; - } - } - } - } - - assertNotNull("Provider for Test1 has not been found", extendedProvider); - - PaletteRoot root = new PaletteRoot(); - extendedProvider.contributeToPalette(null, null, root, new HashMap()); - - //check root now - List rootChildren = root.getChildren(); - assertNotNull("Root children should not be null", rootChildren); - Assert.assertEquals("Root children should be size 1", 1, rootChildren.size()); // one drawer is contributed - - for(Object drawer : rootChildren) { - assertTrue("Child of the root is not a drawer: " + drawer, drawer instanceof org.eclipse.gef.palette.PaletteDrawer); - List toolsAndStack = ((org.eclipse.gef.palette.PaletteDrawer)drawer).getChildren(); - Assert.assertEquals("Drawer should have 4 children: 1 stack and 3 tools.", 4, toolsAndStack.size()); - - Object tool0 = toolsAndStack.get(0); - assertTrue("first element should be a Tool", tool0 instanceof PaletteToolEntry); - assertTrue("first element should have id palettetest1.tool0", ((PaletteToolEntry)tool0).getId().equals("palettetest1.tool0")); - assertTrue("first element should have label MetaClass", ((PaletteToolEntry)tool0).getLabel().equals("MetaClass")); - - Object tool1 = toolsAndStack.get(1); - assertTrue("first element should be a Tool", tool1 instanceof PaletteToolEntry); - Assert.assertEquals("first element should have id palettetest2.class", "palettetest2.class", ((PaletteToolEntry)tool1).getId()); - Assert.assertEquals("first element should have label Abstract Class", "Abstract Class", ((PaletteToolEntry)tool1).getLabel()); - - Object stack1 = toolsAndStack.get(2); - assertTrue("2nd element should be a Stack", stack1 instanceof PaletteStack); - assertTrue("2nd element should have id palettetest1.stack1", ((PaletteStack)stack1).getId().equals("palettetest1.stack1")); - assertTrue("2nd element should have label Stack 1", ((PaletteStack)stack1).getLabel().equals("Stack 1")); - - List stackChildren = ((PaletteStack)stack1).getChildren(); - assertTrue("Stack should have 2 children: 2 tools. but has " + stackChildren.size() + " child(ren).", stackChildren.size() == 3); - Object stackChild = stackChildren.get(0); - assertTrue("stack should be a tool", stackChild instanceof PaletteToolEntry); - assertTrue("tool should have id palettetest1.operation but is " + ((PaletteToolEntry)stackChild).getId(), ((PaletteToolEntry)stackChild).getId().equals("palettetest1.operation")); - assertTrue("first element should have label \"Operation\" but is " + ((PaletteToolEntry)stackChild).getLabel(), ((PaletteToolEntry)stackChild).getLabel().equals("Operation")); - - stackChild = stackChildren.get(1); - assertTrue("stack should be a tool", stackChild instanceof PaletteToolEntry); - assertTrue("tool should have id palettetest1.property but is " + ((PaletteToolEntry)stackChild).getId(), ((PaletteToolEntry)stackChild).getId().equals("palettetest1.property")); - assertTrue("first element should have label \"Property\" but is " + ((PaletteToolEntry)stackChild).getLabel(), ((PaletteToolEntry)stackChild).getLabel().equals("Property")); - - - Object tool3 = toolsAndStack.get(3); - assertTrue("3rd element should be a Tool", tool3 instanceof PaletteToolEntry); - assertTrue("3rd element should have id palettetest1.tool3", ((PaletteToolEntry)tool3).getId().equals("palettetest1.tool3")); - assertTrue("3rd element should have label \"Dependency\", but is " + ((PaletteToolEntry)tool3).getLabel(), ((PaletteToolEntry)tool3).getLabel().equals("Dependency")); - - } - } - -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ExtendedPluginPaletteProviderTests_LoadPaletteConfiguration.java b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ExtendedPluginPaletteProviderTests_LoadPaletteConfiguration.java deleted file mode 100644 index 3a506e2cb9a..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ExtendedPluginPaletteProviderTests_LoadPaletteConfiguration.java +++ /dev/null @@ -1,112 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.paletteconfiguration.tests; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.Collection; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.papyrus.uml.diagram.common.service.ExtendedPluginPaletteProvider; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/** - * Tests cases for the operation load palette configuration - */ -public class ExtendedPluginPaletteProviderTests_LoadPaletteConfiguration extends ExtendedPluginPaletteProvider implements ITestConstants { - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - } - - /** - * @throws java.lang.Exception - */ - @Before - public void setUp() throws Exception { - } - - /** - * @throws java.lang.Exception - */ - @After - public void tearDown() throws Exception { - } - - /** - * Test method for {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#loadConfigurationModel(java.lang.String, java.lang.String)}. - */ - @Test - public final void testLoadConfigurationModel_Test1InPlugin() { - Collection<PaletteConfiguration> result = null; - try { - result = loadConfigurationModel(Platform.getBundle(BUNDLE_ID), "model/Test1.paletteconfiguration"); - } catch (FileNotFoundException e) { - fail("Exception: " + e.getMessage()); - } catch (IOException e) { - fail("I/O Exception: " + e.getMessage()); - } - assertNotNull("Collection should not be null", result); - assertTrue("Collection should return one, and only one element, not :" + result.size(), result.size() == 1); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#loadConfigurationModel(java.lang.String, java.lang.String)} - * . - */ - @Test - public final void testLoadConfigurationModel_Test1InFragmentItself() { - Collection<PaletteConfiguration> result = null; - try { - result = loadConfigurationModel(Platform.getBundle(FRAGMENT_ID), "model/Test1.paletteconfiguration"); - } catch (FileNotFoundException e) { - fail("Exception: " + e.getMessage()); - } catch (IOException e) { - fail("I/O Exception: " + e.getMessage()); - } - assertNotNull("Collection should not be null", result); - assertTrue("Collection should return one, and only one element, not :" + result.size(), result.size() == 1); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#loadConfigurationModel(java.lang.String, java.lang.String)} - * . - */ - @Test - public final void testLoadConfigurationModel_NotExistingFile() { - Collection<PaletteConfiguration> result = null; - try { - result = loadConfigurationModel(Platform.getBundle(FRAGMENT_ID), "model/NoConfiguration.paletteconfiguration"); - } catch (FileNotFoundException e) { - // this should come here - } catch (IOException e) { - fail("I/O Exception: " + e.getMessage()); - } - assertNull("Collection should be null", result); - } - -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ExtendedPluginPaletteProviderTests_RetrievePredefinedEntry.java b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ExtendedPluginPaletteProviderTests_RetrievePredefinedEntry.java deleted file mode 100644 index 262573c6c33..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ExtendedPluginPaletteProviderTests_RetrievePredefinedEntry.java +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.paletteconfiguration.tests; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry; -import org.eclipse.gmf.runtime.gef.ui.internal.palette.PaletteDrawer; -import org.eclipse.gmf.runtime.gef.ui.internal.palette.PaletteStack; -import org.eclipse.papyrus.uml.diagram.common.service.ExtendedPluginPaletteProvider; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/** - * Test Class for {@link ExtendedPluginPaletteProvider#retrieveExistingEntry} method - */ -public class ExtendedPluginPaletteProviderTests_RetrievePredefinedEntry extends ExtendedPluginPaletteProvider { - - /** id of drawer n°1 */ - protected static final String DRAWER1_ID = "drawer1"; //$NON-NLS-1$ - - /** id of drawer n°2 */ - protected static final String DRAWER2_ID = "drawer2"; //$NON-NLS-1$ - - /** id of drawer not existing */ - protected static final String DRAWER_NO_ID = "drawerNot"; //$NON-NLS-1$ - - /** id of stack n°1 */ - protected static final String STACK1_ID = "stack1"; //$NON-NLS-1$ - - /** id of stack not existing */ - protected static final String STACK_NO_ID = "stackNot"; //$NON-NLS-1$ - - /** id of tool n°1 */ - protected static final String TOOL1_ID = "tool1"; //$NON-NLS-1$ - - /** id of tool not existing */ - protected static final String TOOL_NO_ID = "toolNot"; //$NON-NLS-1$ - - /** id of object n°1 */ - protected static final String OBJECT1_ID = "object1"; //$NON-NLS-1$ - - /** map used for the tests */ - private static Map predefinedEntries; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - predefinedEntries = new HashMap(); - addDrawer(DRAWER1_ID); - addDrawer(DRAWER2_ID); - addTool(TOOL1_ID); - addStack(STACK1_ID); - addObject(OBJECT1_ID); - } - - /** - * Adds an undefined object to the predefined entries - * - * @param id - * id of the object - */ - private static void addObject(String id) { - predefinedEntries.put(id, new Object()); - } - - /** - * adds a stack to the predefined entries - * - * @param id - * id of the stack - */ - private static void addStack(String id) { - PaletteStack stack = new PaletteStack(id, id, id, null); - predefinedEntries.put(id, stack); - } - - /** - * adds a tool to the predefined entries - * - * @param id - * id of the tool - */ - private static void addTool(String id) { - PaletteToolEntry entry = new PaletteToolEntry(id, id, null); - predefinedEntries.put(id, entry); - } - - /** - * adds a drawer to the predefined entries - * - * @param id - * id of the drawer - */ - private static void addDrawer(String id) { - PaletteDrawer drawer = new PaletteDrawer(id, id); - predefinedEntries.put(id, drawer); - } - - /** - * @throws java.lang.Exception - */ - @Before - public void setUp() throws Exception { - } - - /** - * @throws java.lang.Exception - */ - @After - public void tearDown() throws Exception { - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveExistingDrawer() { - Object value = retrieveExistingEntry(predefinedEntries, DRAWER1_ID, PaletteDrawer.class); - - assertNotNull(DRAWER1_ID + "should be found", value); - assertTrue(DRAWER1_ID + "should be a GMF PaletteDrawer, but is :" + value.getClass().getName(), value instanceof PaletteDrawer); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveNotExistingDrawer() { - Object value = retrieveExistingEntry(predefinedEntries, DRAWER_NO_ID, PaletteDrawer.class); - - assertNull("No drawer should be found, but found: " + value, value); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveExistingStack() { - Object value = retrieveExistingEntry(predefinedEntries, STACK1_ID, PaletteStack.class); - - assertNotNull(STACK1_ID + "should be found", value); - assertTrue(STACK1_ID + "should be a GMF PaletteStack, but is :" + value.getClass().getName(), value instanceof PaletteStack); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveNonExistingStack() { - Object value = retrieveExistingEntry(predefinedEntries, STACK_NO_ID, PaletteStack.class); - - assertNull("No stack should be found, but found: " + value, value); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveExistingTool() { - Object value = retrieveExistingEntry(predefinedEntries, TOOL1_ID, PaletteToolEntry.class); - - assertNotNull(TOOL1_ID + "should be found", value); - assertTrue(TOOL1_ID + "should be a GMF PaletteToolEntry, but is :" + value.getClass().getName(), value instanceof PaletteToolEntry); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveNonExistingTool() { - Object value = retrieveExistingEntry(predefinedEntries, TOOL_NO_ID, PaletteToolEntry.class); - - assertNull("No toolentry should be found, but found: " + value, value); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveWrongTypedElement_DrawerClass() { - Object value = retrieveExistingEntry(predefinedEntries, TOOL1_ID, PaletteDrawer.class); - assertNull("value should be null, as not from correct type: " + value, value); - - value = retrieveExistingEntry(predefinedEntries, STACK1_ID, PaletteDrawer.class); - assertNull("value should be null, as not from correct type: " + value, value); - - value = retrieveExistingEntry(predefinedEntries, OBJECT1_ID, PaletteDrawer.class); - assertNull("value should be null, as not from correct type: " + value, value); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveWrongTypedElement_StackClass() { - Object value = retrieveExistingEntry(predefinedEntries, TOOL1_ID, PaletteStack.class); - assertNull("value should be null, as not from correct type: " + value, value); - - value = retrieveExistingEntry(predefinedEntries, DRAWER1_ID, PaletteStack.class); - assertNull("value should be null, as not from correct type: " + value, value); - - value = retrieveExistingEntry(predefinedEntries, OBJECT1_ID, PaletteStack.class); - assertNull("value should be null, as not from correct type: " + value, value); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.common.providers.ExtendedPluginPaletteProvider#retrieveExistingEntry(java.util.Map, java.lang.String, java.lang.Class)} - * . - */ - @Test - public final void testRetrieveExistingEntry_retrieveWrongTypedElement_ToolClass() { - Object value = retrieveExistingEntry(predefinedEntries, DRAWER1_ID, PaletteToolEntry.class); - assertNull("value should be null, as not from correct type: " + value, value); - - value = retrieveExistingEntry(predefinedEntries, STACK1_ID, PaletteToolEntry.class); - assertNull("value should be null, as not from correct type: " + value, value); - - value = retrieveExistingEntry(predefinedEntries, OBJECT1_ID, PaletteToolEntry.class); - assertNull("value should be null, as not from correct type: " + value, value); - } -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ITestConstants.java b/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ITestConstants.java deleted file mode 100644 index ccd18320ccc..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/src/org/eclipse/papyrus/paletteconfiguration/tests/ITestConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.paletteconfiguration.tests;
-
-
-/**
- * Interface that holds constants for the test
- */
-public interface ITestConstants {
-
- /** fragment id */
- public final static String FRAGMENT_ID = "org.eclipse.papyrus.paletteconfiguration.tests";
-
- /** bundle id */
- public final static String BUNDLE_ID = "org.eclipse.papyrus.uml.diagram.paletteconfiguration";
-
- /** id of the test 1 configuration */
- public static final String PALETTE_TEST1_ID = "org.eclipse.papyrus.paletteconfiguration.tests.palettetest1";
-}
|