From be67bc8bcf1bf5fb870e17af7506dbf405b62885 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Thu, 30 Jan 2014 11:02:54 +0100 Subject: 424315: [Releng - CSS] The Papyrus CSS Feature should be included as a main component in Papyrus https://bugs.eclipse.org/bugs/show_bug.cgi?id=424315 Add the CSS Tests to Papyrus/Main tests--- .../.classpath | 7 - .../.project | 28 --- .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 30 --- .../about.html | 28 --- .../build.properties | 7 - ....eclipse.papyrus.infra.gmfdiag.css.tests.launch | 40 ---- .../resources/model/classProviderTest/model.di | 17 -- .../model/classProviderTest/model.notation | 57 ----- .../resources/model/classProviderTest/model.uml | 4 - .../resources/model/stylesheetTest/model.di | 17 -- .../resources/model/stylesheetTest/model.notation | 261 --------------------- .../resources/model/stylesheetTest/model.uml | 17 -- .../resources/stylesheets/classProviderTest.css | 98 -------- .../resources/stylesheets/stylesheetTest.css | 55 ----- .../papyrus/infra/gmfdiag/css/tests/Activator.java | 69 ------ .../infra/gmfdiag/css/tests/tests/AllTests.java | 25 -- .../css/tests/tests/CSSClassProviderTest.java | 98 -------- .../gmfdiag/css/tests/tests/CSSStylesheetTest.java | 177 -------------- .../gmfdiag/css/tests/tests/CSSSupportTest.java | 77 ------ .../META-INF/MANIFEST.MF | 1 - .../org/eclipse/papyrus/tests/extra/AllTests.java | 12 +- .../org.eclipse.papyrus.tests/META-INF/MANIFEST.MF | 3 +- .../test/org/eclipse/papyrus/tests/AllTests.java | 7 +- .../.classpath | 7 + .../.project | 28 +++ .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 30 +++ .../about.html | 28 +++ .../build.properties | 7 + ....eclipse.papyrus.infra.gmfdiag.css.tests.launch | 40 ++++ .../resources/model/classProviderTest/model.di | 17 ++ .../model/classProviderTest/model.notation | 57 +++++ .../resources/model/classProviderTest/model.uml | 4 + .../resources/model/stylesheetTest/model.di | 17 ++ .../resources/model/stylesheetTest/model.notation | 261 +++++++++++++++++++++ .../resources/model/stylesheetTest/model.uml | 17 ++ .../resources/stylesheets/classProviderTest.css | 98 ++++++++ .../resources/stylesheets/stylesheetTest.css | 55 +++++ .../papyrus/infra/gmfdiag/css/tests/Activator.java | 69 ++++++ .../infra/gmfdiag/css/tests/tests/AllTests.java | 25 ++ .../css/tests/tests/CSSClassProviderTest.java | 98 ++++++++ .../gmfdiag/css/tests/tests/CSSStylesheetTest.java | 177 ++++++++++++++ .../gmfdiag/css/tests/tests/CSSSupportTest.java | 77 ++++++ 44 files changed, 1131 insertions(+), 1130 deletions(-) delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java delete mode 100644 tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java (limited to 'tests') diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project deleted file mode 100644 index ddbc718c56e..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.infra.gmfdiag.css.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 44217f8c068..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -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/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF deleted file mode 100644 index eb2be6b5fd3..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,30 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.css.xtext;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui;bundle-version="1.0.0", - org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0", - org.eclipse.gmf.runtime.notation;bundle-version="1.5.0", - org.eclipse.papyrus.infra.emf;bundle-version="1.0.0", - org.eclipse.papyrus.infra.core;bundle-version="1.0.0", - org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0", - org.eclipse.core.resources;bundle-version="3.8.0", - org.eclipse.uml2.uml;bundle-version="4.0.0", - org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0", - org.junit;bundle-version="4.10.0" -Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests, - org.eclipse.papyrus.infra.gmfdiag.css.tests.tests -Bundle-Vendor: Eclipse Modeling Project -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.0.0.qualifier -Bundle-Name: CSS Tests (Incubation) -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.tests.Activato - r -Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.tests -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

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 http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

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 http://www.eclipse.org.

- - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties deleted file mode 100644 index 130df98d220..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - resources/,\ - about.html -src.includes = about.html diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch deleted file mode 100644 index 934fbbe559c..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di deleted file mode 100644 index c1e4f445dce..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation deleted file mode 100644 index ad421b8149b..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation +++ /dev/null @@ -1,57 +0,0 @@ - - - - - -
-
-
-
-
- - -
- - -
- - -
- - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml deleted file mode 100644 index 10f71c39957..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di deleted file mode 100644 index 15fd7df2e2b..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation deleted file mode 100644 index da68a47987d..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - myInterface - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - myClass - myOtherClass - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - myClass - - - - - - - - - - - - - - - - - - - - - - - - - - myClass - - - - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml deleted file mode 100644 index e063ffd6ed3..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css deleted file mode 100644 index f45a4299049..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css +++ /dev/null @@ -1,98 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - *****************************************************************************/ - -/** -* Papyrus 0.9 CSS -* Test stylesheet for #getAvailableClasses() -*/ - -/******************************************************** - * All cX should be matched for Interfaces (c01 ~ c17) - * xX should not be matched for Interfaces - *******************************************************/ - - -/**************** Ignored Selector *********************/ - -.anyClass { - -} - -/**************** Simple selectors *********************/ - - -*.c01{ - -} - -Interface.c02{ - -} - -.c03 { - -} - -.c04, .c05, .c06 { - -} - -Class.x01{ - -} - -#x05 { - -} - -/************ Combinator selectors **************/ - -.c07 .c08 { - -} -.c09 Class.x02{ - -} - -.c10 > Class.x03{ - -} - -Interface.c11 + Class.x04 { - -} - -*.c12 + Interface.c13 { - -} - -/************* Combinator Conditions ****************/ - -#x06:x07 { - -} - -.c14#x8:x09{ - -} - -Interface.c15#x10{ - -} - -#x11.c16 { - -} - -#x12.c17:x13 { - -} diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css deleted file mode 100644 index 0542d4d041f..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - *****************************************************************************/ - -/** -* Papyrus 0.9 CSS -* Main test stylesheet -*/ - -* { - gradient:red vertical; -} - -Class { - gradient:none; - fillColor:red; -} - -Interface { - fillColor:yellow; -} - -Interface.myInterface { - fontName:KaiTi; /* TODO: The font name should be case insensitive */ - fillColor:lightgreen; - gradient:dEEpSKyBluE lightgreen horizontal; - elementIcon:false; -} - -Package { - fillColor:white; -} - -/* White elements */ -Class.myClass.myOtherClass, Class.myClass { - fillColor:white; - gradient:none; - bold:false; - fontName: Tunga; -} - -/* Blue + Gradient + Bold */ -Class[isAbstract=true] { - bold:true; - fillColor: rgb(195, 205, 255); - gradient: white vertical; -} diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java deleted file mode 100644 index 5994b38d491..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java +++ /dev/null @@ -1,69 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.css.tests; - -import org.eclipse.papyrus.infra.core.log.LogHelper; -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.gmfdiag.css.tests"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - public static LogHelper log; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - log = new LogHelper(this); - } - - /* - * (non-Javadoc) - * - * @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/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java deleted file mode 100644 index 54ee115ce9a..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java +++ /dev/null @@ -1,25 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - - -@RunWith(Suite.class) -@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class - -}) -public class AllTests { - -} diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java deleted file mode 100644 index a6946632989..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; - - -import java.io.IOException; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.papyrus.infra.emf.utils.EMFHelper; -import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine; -import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; -import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; -import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSClassContentProvider; -import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; -import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -public class CSSClassProviderTest { - - private CSSDiagram diagram; - - private static int expectedNumberOfClasses = 17; - - @Before - public void init() { - ResourceSet resourceSet = new ResourceSetImpl(); - CSSHelper.installCSSSupport(resourceSet); - - URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/classProviderTest/model.notation", true); - try { - Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSet, uri); - Assert.assertNotNull("Cannot find the model", diagram); - Assert.assertTrue("CSS are not activated on this resource", diagram instanceof CSSDiagram); - this.diagram = (CSSDiagram)diagram; - } catch (IOException ex) { - Activator.log.error(ex); - } - } - - @Test - public void testCSSClassContentProvider() { - ExtendedCSSEngine engine = diagram.getEngine(); - IStaticContentProvider provider = new CSSClassContentProvider("Interface", engine); - Object[] result = provider.getElements(); - List resultList = Arrays.asList(result); - - //Result is expected to contain c01 to c17 - //Result should not contain x01 to x13 - //Result may contain anything else (Depending on the current Workspace Theme). - - //Check that all expected classes are returned - for(int i = 1; i <= expectedNumberOfClasses; i++) { - String expectedClassName = "c"; - if(i < 10) { - expectedClassName += "0"; - } - expectedClassName += i; - Assert.assertTrue("An expected CSS Class has not been found: " + expectedClassName, resultList.contains(expectedClassName)); - } - - //Check that no invalid class is returned - for(Object object : resultList) { - Assert.assertTrue("The CSSClassContentProvider must return Strings", object instanceof String); - String cssClass = (String)object; - - Assert.assertFalse("Invalid CSS Class has been returned: " + cssClass, cssClass.matches("x[0-9]+")); - } - } - - @After - public void dispose() { - Iterator iterator = diagram.eResource().getResourceSet().getResources().iterator(); - while(iterator.hasNext()) { - iterator.next().unload(); - iterator.remove(); - } - } -} diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java deleted file mode 100644 index 0c1efe15355..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; - -import java.io.IOException; -import java.util.Iterator; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.gmf.runtime.notation.GradientStyle; -import org.eclipse.gmf.runtime.notation.Shape; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper; -import org.eclipse.papyrus.infra.emf.utils.EMFHelper; -import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; -import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; -import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; -import org.eclipse.uml2.uml.NamedElement; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -public class CSSStylesheetTest { - - private CSSDiagram diagram; - - @Before - public void init() { - ResourceSet resourceSet = new ResourceSetImpl(); - CSSHelper.installCSSSupport(resourceSet); - - URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true); - try { - Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSet, uri); - Assert.assertNotNull("Cannot find the model", diagram); - Assert.assertTrue("CSS are not activated on this resource", diagram instanceof CSSDiagram); - this.diagram = (CSSDiagram)diagram; - } catch (IOException ex) { - Activator.log.error(ex); - } - } - - @Test - public void testClassStyle() { - Shape classView = findShape("Class1"); - if(classView == null) { - return; - } - - Assert.assertEquals("Invalid color", rgb(255, 0, 0), classView.getFillColor()); //Red = #FF0000 - Assert.assertNull("Invalid gradient", classView.getGradient()); - Assert.assertTrue(AppearanceHelper.showElementIcon(classView)); - } - - @Test - public void testInterfaceStyle() { - Shape interfaceView = findShape("Interface1"); - - Assert.assertNotNull(interfaceView.getGradient()); - Assert.assertEquals(rgb(255, 255, 0), interfaceView.getFillColor()); //Yellow = #FFFF00 - Assert.assertEquals(rgb(255, 0, 0), interfaceView.getGradient().getGradientColor1()); //Red = #FF0000 - Assert.assertEquals(GradientStyle.VERTICAL, interfaceView.getGradient().getGradientStyle()); - Assert.assertTrue(AppearanceHelper.showElementIcon(interfaceView)); - } - - @Test - public void testCSSClassStyle() { - Shape interfaceView = findShape("Interface2"); - Assert.assertNotNull(interfaceView.getGradient()); - Assert.assertEquals(rgb(144, 238, 144), interfaceView.getFillColor()); //Lightgreen = #90EE90 - - //Case insensitive color name - Assert.assertEquals(rgb(0, 191, 255), interfaceView.getGradient().getGradientColor1()); //DeepSkyBlue = #00BFFF - - Assert.assertEquals(GradientStyle.HORIZONTAL, interfaceView.getGradient().getGradientStyle()); - Assert.assertFalse(AppearanceHelper.showElementIcon(interfaceView)); - - //TODO: Font names should be case-insensitive - Assert.assertEquals("KaiTi", interfaceView.getFontName()); - } - - @Test - public void testPackage() { - Shape packageView = findShape("Package1"); - Assert.assertNotNull(packageView.getGradient()); - - //Inherited style (From *) - Assert.assertEquals(rgb(255, 0, 0), packageView.getGradient().getGradientColor1()); //Red = #FF0000 - } - - @Test - public void testPriorities() { - //Tests the priorities between styles: - //.myClass : Low priority - //.myClass.myOtherClass : Highest priority - //[isAbstract=true] : Medium priority - //Styles should also be merged when they aren't conflicting (ie. [isAbstract] + .myClass -> fontName = Tunga) - Shape class3 = findShape("Class3"); - Shape class5 = findShape("Class5"); - - testBlueStyle(class3); //isAbstract - testBlueStyle(class5); //isAbstract - - Shape class4 = findShape("Class4"); - - testWhiteStyle(class4); //.myClass.myOtherClass (Overrides isAbstract) - testFontName(class4); //.myClass (Doesn't conflict with isAbstract) - - Shape class6 = findShape("Class6"); - - testWhiteStyle(class6); //.myClass - testFontName(class6); //.myClass - - Shape class7 = findShape("Class7"); - - testBlueStyle(class7); //isAbstract - testFontName(class7); //.myClass (Doesn't conflict with isAbstract) - } - - private void testBlueStyle(Shape shape) { - Assert.assertEquals(rgb(195, 205, 255), shape.getFillColor()); //rgb syntax - Assert.assertTrue(shape.isBold()); - Assert.assertNotNull(shape.getGradient()); - } - - private void testWhiteStyle(Shape shape) { - Assert.assertEquals(rgb(255, 255, 255), shape.getFillColor()); //White = #FFFFFF (Hexa syntax) - Assert.assertFalse(shape.isBold()); - Assert.assertNull(shape.getGradient()); - } - - private void testFontName(Shape shape) { - Assert.assertEquals("Tunga", shape.getFontName()); - } - - @After - public void dispose() { - Iterator iterator = diagram.eResource().getResourceSet().getResources().iterator(); - while(iterator.hasNext()) { - iterator.next().unload(); - iterator.remove(); - } - } - - private int rgb(int red, int green, int blue) { - return red | green << 8 | blue << 16; - } - - private Shape findShape(String elementName) { - for(Object viewObject : diagram.getChildren()) { - View view = (View)viewObject; - if(view instanceof Shape && view.getElement() instanceof NamedElement) { - NamedElement element = (NamedElement)view.getElement(); - if(elementName.equals(element.getName())) { - return (Shape)view; - } - } - } - - Assert.fail("Cannot find the view associated to " + elementName); - return null; - } -} diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java deleted file mode 100644 index c0fb3f6647a..00000000000 --- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.papyrus.infra.emf.utils.EMFHelper; -import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; -import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; -import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; -import org.junit.Assert; -import org.junit.Test; - -/** - * Test the installation of CSS Support on a standard ResourceSet - * - * @author Camille Letavernier - * - */ -public class CSSSupportTest { - - /** - * Installs the CSS support on a resource set and check the results - * - * @throws Exception - */ - @Test - public void testCSSSupport() throws Exception { - //Resource set with CSS Support installed - ResourceSet resourceSetWithCSSSupport = new ResourceSetImpl(); - CSSHelper.installCSSSupport(resourceSetWithCSSSupport); - - URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true); - - Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSetWithCSSSupport, uri); - - //The diagram should be a CSSDiagram - Assert.assertTrue(diagram instanceof CSSDiagram); - - CSSDiagram cssDiagram = (CSSDiagram)diagram; - - //The CSSDiagram should have a CSSEngine - Assert.assertNotNull(cssDiagram.getEngine()); - - //Dispose the CSS Engine - resourceSetWithCSSSupport.getResources().remove(diagram.eResource()); - } - - /** - * Tests a standard resource set (without CSS support) and check the results. - * - * @throws Exception - */ - @Test - public void testWithoutCSSSupport() throws Exception { - //Standard resource set (Without CSS Support installed) - ResourceSet resourceSetWithoutCSSSupport = new ResourceSetImpl(); - - URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true); - - Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSetWithoutCSSSupport, uri); - - //The diagram should be a standard GMF Diagram (i.e. not a CSSDiagram) - Assert.assertFalse(diagram instanceof CSSDiagram); - } -} diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF index e7c905da4a8..2844ae19c38 100644 --- a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF +++ b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF @@ -1,7 +1,6 @@ Manifest-Version: 1.0 Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, - org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.0.0", org.eclipse.papyrus.bundles.tests;bundle-version="1.0.0", org.junit;bundle-version="4.10.0", org.eclipse.papyrus.cdo.core.tests;bundle-version="1.0.0", diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java index 10d5fbe1813..14f733e1eae 100644 --- a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java +++ b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (c) 2012 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 @@ -38,7 +38,7 @@ public class AllTests { /* UML Compare tests */ /** * UML Compare tests have been temporarily disabled. See: - * + * * 389811: [Papyrus Compare] The Papyrus Compare feature is not compatible with Kepler * https://bugs.eclipse.org/bugs/show_bug.cgi?id=389811 */ @@ -47,9 +47,7 @@ public class AllTests { // suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.compare.diff.tests.AllTests.class)); /* **************** plugins *********************** */ - /* css */ - suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.gmfdiag.css.tests.tests.AllTests.class)); - + } /** @@ -59,7 +57,7 @@ public class AllTests { /** * Constructor. - * + * * @param clazz * the suite class – AllTests2 * @throws InitializationError @@ -73,7 +71,7 @@ public class AllTests { /** * Returns the list of test classes - * + * * @return the list of test classes */ private static Class[] getSuites() { diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF index d71f488e326..e26293a32f0 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF @@ -41,7 +41,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.nattable.views.editor.tests;bundle-version="1.0.0", org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.0.0", org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.0.0", - org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.0.0" + org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.0.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.0.0.qualifier diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java index e07d3dff747..5b786c77510 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java +++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java @@ -1,6 +1,6 @@ /***************************************************************************** * 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 @@ -61,6 +61,9 @@ public class AllTests { /* search */ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.search.tests.suites.AllTests.class)); + /* css */ + suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.gmfdiag.css.tests.tests.AllTests.class)); + // /* sysml moved to a separate launcher */ // @@ -83,7 +86,7 @@ public class AllTests { suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.usecase.tests.AllTests.class)); //suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests.class)); //Disabled. They currently do not run on Hudson // suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.interactionoverview.tests.AllTests.class)); //Disabled. They currently do not run on Hudson - // + // //nattable tests suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.nattable.tests.tests.AllTests.class)); diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project new file mode 100644 index 00000000000..ddbc718c56e --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.gmfdiag.css.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..44217f8c068 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.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/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..eb2be6b5fd3 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.css.xtext;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui;bundle-version="1.0.0", + org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0", + org.eclipse.gmf.runtime.notation;bundle-version="1.5.0", + org.eclipse.papyrus.infra.emf;bundle-version="1.0.0", + org.eclipse.papyrus.infra.core;bundle-version="1.0.0", + org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0", + org.eclipse.core.resources;bundle-version="3.8.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0", + org.junit;bundle-version="4.10.0" +Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests, + org.eclipse.papyrus.infra.gmfdiag.css.tests.tests +Bundle-Vendor: Eclipse Modeling Project +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.0.0.qualifier +Bundle-Name: CSS Tests (Incubation) +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.tests.Activato + r +Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.tests +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

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 http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

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 http://www.eclipse.org.

+ + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties new file mode 100644 index 00000000000..130df98d220 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + resources/,\ + about.html +src.includes = about.html diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch new file mode 100644 index 00000000000..934fbbe559c --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di new file mode 100644 index 00000000000..c1e4f445dce --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation new file mode 100644 index 00000000000..ad421b8149b --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation @@ -0,0 +1,57 @@ + + + + + +
+
+
+
+
+ + +
+ + +
+ + +
+ + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml new file mode 100644 index 00000000000..10f71c39957 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml @@ -0,0 +1,4 @@ + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di new file mode 100644 index 00000000000..15fd7df2e2b --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation new file mode 100644 index 00000000000..da68a47987d --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + myInterface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + myClass + myOtherClass + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + myClass + + + + + + + + + + + + + + + + + + + + + + + + + + myClass + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml new file mode 100644 index 00000000000..e063ffd6ed3 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css new file mode 100644 index 00000000000..f45a4299049 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css @@ -0,0 +1,98 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr + *****************************************************************************/ + +/** +* Papyrus 0.9 CSS +* Test stylesheet for #getAvailableClasses() +*/ + +/******************************************************** + * All cX should be matched for Interfaces (c01 ~ c17) + * xX should not be matched for Interfaces + *******************************************************/ + + +/**************** Ignored Selector *********************/ + +.anyClass { + +} + +/**************** Simple selectors *********************/ + + +*.c01{ + +} + +Interface.c02{ + +} + +.c03 { + +} + +.c04, .c05, .c06 { + +} + +Class.x01{ + +} + +#x05 { + +} + +/************ Combinator selectors **************/ + +.c07 .c08 { + +} +.c09 Class.x02{ + +} + +.c10 > Class.x03{ + +} + +Interface.c11 + Class.x04 { + +} + +*.c12 + Interface.c13 { + +} + +/************* Combinator Conditions ****************/ + +#x06:x07 { + +} + +.c14#x8:x09{ + +} + +Interface.c15#x10{ + +} + +#x11.c16 { + +} + +#x12.c17:x13 { + +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css new file mode 100644 index 00000000000..0542d4d041f --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css @@ -0,0 +1,55 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr + *****************************************************************************/ + +/** +* Papyrus 0.9 CSS +* Main test stylesheet +*/ + +* { + gradient:red vertical; +} + +Class { + gradient:none; + fillColor:red; +} + +Interface { + fillColor:yellow; +} + +Interface.myInterface { + fontName:KaiTi; /* TODO: The font name should be case insensitive */ + fillColor:lightgreen; + gradient:dEEpSKyBluE lightgreen horizontal; + elementIcon:false; +} + +Package { + fillColor:white; +} + +/* White elements */ +Class.myClass.myOtherClass, Class.myClass { + fillColor:white; + gradient:none; + bold:false; + fontName: Tunga; +} + +/* Blue + Gradient + Bold */ +Class[isAbstract=true] { + bold:true; + fillColor: rgb(195, 205, 255); + gradient: white vertical; +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java new file mode 100644 index 00000000000..5994b38d491 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.css.tests; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +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.gmfdiag.css.tests"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + } + + /* + * (non-Javadoc) + * + * @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/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java new file mode 100644 index 00000000000..54ee115ce9a --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java @@ -0,0 +1,25 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + + +@RunWith(Suite.class) +@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class + +}) +public class AllTests { + +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java new file mode 100644 index 00000000000..a6946632989 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java @@ -0,0 +1,98 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; + + +import java.io.IOException; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine; +import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; +import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSClassContentProvider; +import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + + +public class CSSClassProviderTest { + + private CSSDiagram diagram; + + private static int expectedNumberOfClasses = 17; + + @Before + public void init() { + ResourceSet resourceSet = new ResourceSetImpl(); + CSSHelper.installCSSSupport(resourceSet); + + URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/classProviderTest/model.notation", true); + try { + Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSet, uri); + Assert.assertNotNull("Cannot find the model", diagram); + Assert.assertTrue("CSS are not activated on this resource", diagram instanceof CSSDiagram); + this.diagram = (CSSDiagram)diagram; + } catch (IOException ex) { + Activator.log.error(ex); + } + } + + @Test + public void testCSSClassContentProvider() { + ExtendedCSSEngine engine = diagram.getEngine(); + IStaticContentProvider provider = new CSSClassContentProvider("Interface", engine); + Object[] result = provider.getElements(); + List resultList = Arrays.asList(result); + + //Result is expected to contain c01 to c17 + //Result should not contain x01 to x13 + //Result may contain anything else (Depending on the current Workspace Theme). + + //Check that all expected classes are returned + for(int i = 1; i <= expectedNumberOfClasses; i++) { + String expectedClassName = "c"; + if(i < 10) { + expectedClassName += "0"; + } + expectedClassName += i; + Assert.assertTrue("An expected CSS Class has not been found: " + expectedClassName, resultList.contains(expectedClassName)); + } + + //Check that no invalid class is returned + for(Object object : resultList) { + Assert.assertTrue("The CSSClassContentProvider must return Strings", object instanceof String); + String cssClass = (String)object; + + Assert.assertFalse("Invalid CSS Class has been returned: " + cssClass, cssClass.matches("x[0-9]+")); + } + } + + @After + public void dispose() { + Iterator iterator = diagram.eResource().getResourceSet().getResources().iterator(); + while(iterator.hasNext()) { + iterator.next().unload(); + iterator.remove(); + } + } +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java new file mode 100644 index 00000000000..0c1efe15355 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java @@ -0,0 +1,177 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; + +import java.io.IOException; +import java.util.Iterator; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.GradientStyle; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; +import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; +import org.eclipse.uml2.uml.NamedElement; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + + +public class CSSStylesheetTest { + + private CSSDiagram diagram; + + @Before + public void init() { + ResourceSet resourceSet = new ResourceSetImpl(); + CSSHelper.installCSSSupport(resourceSet); + + URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true); + try { + Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSet, uri); + Assert.assertNotNull("Cannot find the model", diagram); + Assert.assertTrue("CSS are not activated on this resource", diagram instanceof CSSDiagram); + this.diagram = (CSSDiagram)diagram; + } catch (IOException ex) { + Activator.log.error(ex); + } + } + + @Test + public void testClassStyle() { + Shape classView = findShape("Class1"); + if(classView == null) { + return; + } + + Assert.assertEquals("Invalid color", rgb(255, 0, 0), classView.getFillColor()); //Red = #FF0000 + Assert.assertNull("Invalid gradient", classView.getGradient()); + Assert.assertTrue(AppearanceHelper.showElementIcon(classView)); + } + + @Test + public void testInterfaceStyle() { + Shape interfaceView = findShape("Interface1"); + + Assert.assertNotNull(interfaceView.getGradient()); + Assert.assertEquals(rgb(255, 255, 0), interfaceView.getFillColor()); //Yellow = #FFFF00 + Assert.assertEquals(rgb(255, 0, 0), interfaceView.getGradient().getGradientColor1()); //Red = #FF0000 + Assert.assertEquals(GradientStyle.VERTICAL, interfaceView.getGradient().getGradientStyle()); + Assert.assertTrue(AppearanceHelper.showElementIcon(interfaceView)); + } + + @Test + public void testCSSClassStyle() { + Shape interfaceView = findShape("Interface2"); + Assert.assertNotNull(interfaceView.getGradient()); + Assert.assertEquals(rgb(144, 238, 144), interfaceView.getFillColor()); //Lightgreen = #90EE90 + + //Case insensitive color name + Assert.assertEquals(rgb(0, 191, 255), interfaceView.getGradient().getGradientColor1()); //DeepSkyBlue = #00BFFF + + Assert.assertEquals(GradientStyle.HORIZONTAL, interfaceView.getGradient().getGradientStyle()); + Assert.assertFalse(AppearanceHelper.showElementIcon(interfaceView)); + + //TODO: Font names should be case-insensitive + Assert.assertEquals("KaiTi", interfaceView.getFontName()); + } + + @Test + public void testPackage() { + Shape packageView = findShape("Package1"); + Assert.assertNotNull(packageView.getGradient()); + + //Inherited style (From *) + Assert.assertEquals(rgb(255, 0, 0), packageView.getGradient().getGradientColor1()); //Red = #FF0000 + } + + @Test + public void testPriorities() { + //Tests the priorities between styles: + //.myClass : Low priority + //.myClass.myOtherClass : Highest priority + //[isAbstract=true] : Medium priority + //Styles should also be merged when they aren't conflicting (ie. [isAbstract] + .myClass -> fontName = Tunga) + Shape class3 = findShape("Class3"); + Shape class5 = findShape("Class5"); + + testBlueStyle(class3); //isAbstract + testBlueStyle(class5); //isAbstract + + Shape class4 = findShape("Class4"); + + testWhiteStyle(class4); //.myClass.myOtherClass (Overrides isAbstract) + testFontName(class4); //.myClass (Doesn't conflict with isAbstract) + + Shape class6 = findShape("Class6"); + + testWhiteStyle(class6); //.myClass + testFontName(class6); //.myClass + + Shape class7 = findShape("Class7"); + + testBlueStyle(class7); //isAbstract + testFontName(class7); //.myClass (Doesn't conflict with isAbstract) + } + + private void testBlueStyle(Shape shape) { + Assert.assertEquals(rgb(195, 205, 255), shape.getFillColor()); //rgb syntax + Assert.assertTrue(shape.isBold()); + Assert.assertNotNull(shape.getGradient()); + } + + private void testWhiteStyle(Shape shape) { + Assert.assertEquals(rgb(255, 255, 255), shape.getFillColor()); //White = #FFFFFF (Hexa syntax) + Assert.assertFalse(shape.isBold()); + Assert.assertNull(shape.getGradient()); + } + + private void testFontName(Shape shape) { + Assert.assertEquals("Tunga", shape.getFontName()); + } + + @After + public void dispose() { + Iterator iterator = diagram.eResource().getResourceSet().getResources().iterator(); + while(iterator.hasNext()) { + iterator.next().unload(); + iterator.remove(); + } + } + + private int rgb(int red, int green, int blue) { + return red | green << 8 | blue << 16; + } + + private Shape findShape(String elementName) { + for(Object viewObject : diagram.getChildren()) { + View view = (View)viewObject; + if(view instanceof Shape && view.getElement() instanceof NamedElement) { + NamedElement element = (NamedElement)view.getElement(); + if(elementName.equals(element.getName())) { + return (Shape)view; + } + } + } + + Assert.fail("Cannot find the view associated to " + elementName); + return null; + } +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java new file mode 100644 index 00000000000..c0fb3f6647a --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java @@ -0,0 +1,77 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; +import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; +import org.junit.Assert; +import org.junit.Test; + +/** + * Test the installation of CSS Support on a standard ResourceSet + * + * @author Camille Letavernier + * + */ +public class CSSSupportTest { + + /** + * Installs the CSS support on a resource set and check the results + * + * @throws Exception + */ + @Test + public void testCSSSupport() throws Exception { + //Resource set with CSS Support installed + ResourceSet resourceSetWithCSSSupport = new ResourceSetImpl(); + CSSHelper.installCSSSupport(resourceSetWithCSSSupport); + + URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true); + + Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSetWithCSSSupport, uri); + + //The diagram should be a CSSDiagram + Assert.assertTrue(diagram instanceof CSSDiagram); + + CSSDiagram cssDiagram = (CSSDiagram)diagram; + + //The CSSDiagram should have a CSSEngine + Assert.assertNotNull(cssDiagram.getEngine()); + + //Dispose the CSS Engine + resourceSetWithCSSSupport.getResources().remove(diagram.eResource()); + } + + /** + * Tests a standard resource set (without CSS support) and check the results. + * + * @throws Exception + */ + @Test + public void testWithoutCSSSupport() throws Exception { + //Standard resource set (Without CSS Support installed) + ResourceSet resourceSetWithoutCSSSupport = new ResourceSetImpl(); + + URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true); + + Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSetWithoutCSSSupport, uri); + + //The diagram should be a standard GMF Diagram (i.e. not a CSSDiagram) + Assert.assertFalse(diagram instanceof CSSDiagram); + } +} -- cgit v1.2.3 From 3d98d0203b66ab05bda7c24d2c032c83391023fd Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Thu, 30 Jan 2014 14:30:51 +0100 Subject: 417178: [CSS] The CSS Engine shall support compartments (Show/Hide, collapse, show title...) https://bugs.eclipse.org/bugs/show_bug.cgi?id=417178 Add tests--- .../AddMaskManagedLabelDisplayCommand.java | 65 ------ .../emf/appearance/style/ILabelMaskProvider.java | 37 --- .../infra/gmfdiag/css/engine/DiagramCSSEngine.java | 5 +- .../ViewLabelMaskManagerAdapterFactory.java | 53 ----- .../.project | 6 + .../META-INF/MANIFEST.MF | 3 +- ....eclipse.papyrus.infra.gmfdiag.css.tests.launch | 3 +- .../resources/model/compartmentsTest/model.di | 23 ++ .../model/compartmentsTest/model.notation | 254 +++++++++++++++++++++ .../resources/model/compartmentsTest/model.uml | 44 ++++ .../resources/stylesheets/compartments.css | 39 ++++ .../resources/stylesheets/labels.css | 0 .../infra/gmfdiag/css/tests/tests/AllTests.java | 4 +- .../css/tests/tests/CSSCompartmentsTests.java | 233 +++++++++++++++++++ 14 files changed, 609 insertions(+), 160 deletions(-) delete mode 100644 plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/commands/AddMaskManagedLabelDisplayCommand.java delete mode 100644 plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/style/ILabelMaskProvider.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/ViewLabelMaskManagerAdapterFactory.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java (limited to 'tests') diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/commands/AddMaskManagedLabelDisplayCommand.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/commands/AddMaskManagedLabelDisplayCommand.java deleted file mode 100644 index aed6716800b..00000000000 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/commands/AddMaskManagedLabelDisplayCommand.java +++ /dev/null @@ -1,65 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2008 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) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.appearance.commands; - -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.papyrus.infra.emf.appearance.Activator; -import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants; -import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand; - -/** - * The Class AddAppliedStereotypeToDisplayCommand used to set the list of applied stereotype to - * display - */ -public class AddMaskManagedLabelDisplayCommand extends CreateEAnnotationCommand { - - /** new Mask Value */ - private int maskValue; - - /** - * Instantiates a new sets the applied stereotype to display command. - * - * @param domain - * the editing domain that manages the command - * @param object - * the object to be modified - * @param maskValue - * the mask value to be stored - */ - public AddMaskManagedLabelDisplayCommand(TransactionalEditingDomain domain, EModelElement object, int maskValue) { - super(domain, object, VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION); - this.maskValue = maskValue; - } - - /** - * {@inheritDoc} - */ - @Override - protected void doExecute() { - - EAnnotation oldAnnotation = getObject().getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION); - if(oldAnnotation == null) { - oldAnnotation = createEAnnotation(); - attachEannotation(oldAnnotation, getObject()); - } - Activator.log.debug(maskValue + " -> " + Integer.toString(maskValue)); - replaceEntry(oldAnnotation, VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE, Integer.toString(maskValue)); - - replaceEannotation(getObject().getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION), getObject()); - - } - -} diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/style/ILabelMaskProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/style/ILabelMaskProvider.java deleted file mode 100644 index a8fa4373ef8..00000000000 --- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/src/org/eclipse/papyrus/infra/emf/appearance/style/ILabelMaskProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.emf.appearance.style; - -import java.util.Map; - -/** - * An interface to retrieve the label masks associated to an element - * - * @author Camille Letavernier - * - */ -public interface ILabelMaskProvider { - - /** - * Returns the list of masks for this provider - * - * @return - */ - public Map getMasks(); - - /** - * Returns the default mask value for this provider - * - * @return - */ - public int getDefaultValue(); -} diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java index d89c4aea7c6..4d3e95c30bf 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java @@ -77,7 +77,10 @@ public class DiagramCSSEngine extends ExtendedCSSEngineImpl implements IChangeLi } } else { URI uri = URI.createURI(styleSheet.getPath()); - uri = uri.resolve(diagram.eResource().getURI()); + if(uri.isRelative()) { + uri = uri.resolve(diagram.eResource().getURI()); + } + path = uri.toString(); } URL url = new URL(path); diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/ViewLabelMaskManagerAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/ViewLabelMaskManagerAdapterFactory.java deleted file mode 100644 index a3b40d16888..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/ViewLabelMaskManagerAdapterFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 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: - * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.common.providers; - -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.core.runtime.Platform; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.emf.appearance.style.ILabelMaskProvider; - -/** - * An AdapterFactory to retrieve a {@link ILabelMaskProvider} from a GMF {@link View} - * - * It delegates the adapter resolution to the view's element (if not null) - * - * @author Camille Letavernier - * - */ -public class ViewLabelMaskManagerAdapterFactory implements IAdapterFactory { - - /** - * {@inheritDoc} - */ - @Override - public ILabelMaskProvider getAdapter(Object adaptableObject, Class adapterType) { - if(adapterType == ILabelMaskProvider.class && adaptableObject instanceof View) { - //Forwards the resolution of the adapter to the view's semantic element - View view = (View)adaptableObject; - if(view.getElement() != null && view.getElement() != view) { - return (ILabelMaskProvider)Platform.getAdapterManager().getAdapter(view.getElement(), adapterType); - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Class[] getAdapterList() { - return new Class[]{ ILabelMaskProvider.class }; - } - -} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project index ddbc718c56e..ff2463a3162 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project @@ -5,6 +5,11 @@ + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -24,5 +29,6 @@ org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF index eb2be6b5fd3..481cbb8fc50 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF @@ -15,7 +15,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.resources;bundle-version="3.8.0", org.eclipse.uml2.uml;bundle-version="4.0.0", org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0", - org.junit;bundle-version="4.10.0" + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0" Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests, org.eclipse.papyrus.infra.gmfdiag.css.tests.tests Bundle-Vendor: Eclipse Modeling Project diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch index 934fbbe559c..eb1de64a68e 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch @@ -23,11 +23,12 @@ + - + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di new file mode 100644 index 00000000000..b38a75b62ee --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation new file mode 100644 index 00000000000..6fa635f903c --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml new file mode 100644 index 00000000000..b356eaf5ce0 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml @@ -0,0 +1,44 @@ + + + + Test model for CSS in Luna >= M5 (Compartments, Labels) + + + Expected: Attribute collapsed, Nested classifier hidden + + + Expected: Compartments hidden + + + Expected: Collapsed = false + + + Expected: Attribute and Operation visible + + + Expected: Compartment Attribute and Operation visible + + + Expected: Only operation compartment is visible + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css new file mode 100644 index 00000000000..a07ea565036 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css @@ -0,0 +1,39 @@ +* { + showTitle: false; +} + +/* Check showTitle, to avoid priority conflicts with more specific rules */ +.showTitleForAllCompartments Compartment { + showTitle: true; +} + +Interface > Compartment[kind=attribute], +Interface > Compartment[kind=nestedClassifier] { + visible:false; +} + +Interface[ownedAttribute] > Compartment[kind=attribute]{ + visible:true; +} + +Compartment[kind=nestedClassifier] { + visible: false; +} + + +/* Collapse the Attribute compartment if the Class contains a P1 attribute (Displayed) */ +Class[ownedAttribute~="P1"] > Compartment[kind=attribute]{ + collapsed: true; +} + +Enumeration > Compartment { + collapsed: true; +} + +Enumeration > Compartment[kind=EnUmerAtionLiteRal]{ /* Case insensitive */ + collapsed: false; +} + +Compartment { + showTitle: true; +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java index 54ee115ce9a..185aab5136d 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (c) 2012 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 @@ -17,7 +17,7 @@ import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) -@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class +@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class, CSSCompartmentsTests.class }) public class AllTests { diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java new file mode 100644 index 00000000000..c311a50ca4e --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java @@ -0,0 +1,233 @@ +/***************************************************************************** + * Copyright (c) 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests; + +import java.io.IOException; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl; +import org.eclipse.gmf.runtime.notation.BasicCompartment; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.TitleStyle; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomStringStyleObservableList; +import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.helper.ResetStyleHelper; +import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram; +import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator; +import org.eclipse.uml2.uml.NamedElement; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * Test case for Compartment-related styles and properties + * See resources/model/compartmentsTest/model.di for details + * + * @author Camille Letavernier + * + */ +public class CSSCompartmentsTests { + + public static final String CLASS_ATTRIBUTE_COMPARTMENT_TYPE = "7017"; //$NON-NLS-1$ + + public static final String CLASS_OPERATION_COMPARTMENT_TYPE = "7018"; //$NON-NLS-1$ + + public static final String CLASS_CLASSIFIER_COMPARTMENT_TYPE = "7019"; //$NON-NLS-1$ + + public static final String INTERFACE_ATTRIBUTE_COMPARTMENT_TYPE = "7006"; //$NON-NLS-1$ + + public static final String INTERFACE_OPERATION_COMPARTMENT_TYPE = "7007"; //$NON-NLS-1$ + + public static final String INTERFACE_INTERFACEIFIER_COMPARTMENT_TYPE = "7008"; //$NON-NLS-1$ + + public static final String ENUMERATION_LITERAL_COMPARTMENT_TYPE = "7015"; //$NON-NLS-1$ + + private CSSDiagram diagram; + + @Before + public void init() { + ResourceSet resourceSet = new ResourceSetImpl(); + CSSHelper.installCSSSupport(resourceSet); + + URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/compartmentsTest/model.notation", true); //$NON-NLS-1$ + try { + Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSet, uri); + Assert.assertNotNull("Cannot find the model", diagram); + Assert.assertTrue("CSS are not activated on this resource", diagram instanceof CSSDiagram); + this.diagram = (CSSDiagram)diagram; + } catch (IOException ex) { + Activator.log.error(ex); + } + } + + /* Test Class1 and Class2 */ + @Test + public void testAttributeCompartment() { + Shape class1 = findShape("Class1"); + Shape class2 = findShape("Class2"); + + BasicCompartment attributes1 = findCompartment(class1, CLASS_ATTRIBUTE_COMPARTMENT_TYPE); + Assert.assertTrue("Attribute compartment should be collapsed, as it contains a P1 property", attributes1.isCollapsed()); + Assert.assertTrue("Attribute compartment should be visible", attributes1.isVisible()); + BasicCompartment operations1 = findCompartment(class1, CLASS_OPERATION_COMPARTMENT_TYPE); + Assert.assertTrue("Operation compartment should be visible", operations1.isVisible()); + BasicCompartment classifiers1 = findCompartment(class1, CLASS_CLASSIFIER_COMPARTMENT_TYPE); + Assert.assertFalse("Classifiers compartment should be hidden", classifiers1.isVisible()); + + BasicCompartment attributes2 = findCompartment(class2, CLASS_ATTRIBUTE_COMPARTMENT_TYPE); + Assert.assertFalse("Attribute compartment should not be collapsed, as it doesn't contain a P1 property", attributes2.isCollapsed()); + Assert.assertTrue("Attribute compartment should be visible", attributes2.isVisible()); + BasicCompartment operations2 = findCompartment(class2, CLASS_OPERATION_COMPARTMENT_TYPE); + Assert.assertTrue("Operation compartment should be visible", operations2.isVisible()); + BasicCompartment classifiers2 = findCompartment(class2, CLASS_CLASSIFIER_COMPARTMENT_TYPE); + Assert.assertFalse("Classifiers compartment should be hidden", classifiers2.isVisible()); + + + } + + /* Test Enumeration1 */ + @Test + //Currently fails. The EnumerationLiteral compartment is not defined in the NotationTypesMap + public void testCaseInsensitiveForEnumeration() { + Shape enumeration = findShape("Enumeration1"); + BasicCompartment compartment = findCompartment(enumeration, ENUMERATION_LITERAL_COMPARTMENT_TYPE); + + Assert.assertFalse("EnumerationLiteral Compartment should not be collapsed", compartment.isCollapsed()); + } + + /* Test Interface 1 and Interface 2 */ + //Currently fails. The interface compartments are not defined in the NotationTypesMap + @Test + public void testAttributeCompartmentForInterface() { + Shape interface1 = findShape("Interface1"); + Shape interface2 = findShape("Interface2"); + + BasicCompartment attributes1 = findCompartment(interface1, INTERFACE_ATTRIBUTE_COMPARTMENT_TYPE); + Assert.assertTrue("Attribute compartment should be visible, as it contains a Property", attributes1.isVisible()); + BasicCompartment operations1 = findCompartment(interface1, INTERFACE_OPERATION_COMPARTMENT_TYPE); + Assert.assertTrue("Operation compartment should be visible", operations1.isVisible()); + BasicCompartment classifiers1 = findCompartment(interface1, INTERFACE_INTERFACEIFIER_COMPARTMENT_TYPE); + Assert.assertFalse("Classifiers compartment should be hidden", classifiers1.isVisible()); + + BasicCompartment attributes2 = findCompartment(interface2, INTERFACE_ATTRIBUTE_COMPARTMENT_TYPE); + Assert.assertFalse("Attribute compartment should not be visible, as it doesn't contain any property", attributes2.isVisible()); + BasicCompartment operations2 = findCompartment(interface2, INTERFACE_OPERATION_COMPARTMENT_TYPE); + Assert.assertTrue("Operation compartment should be visible", operations2.isVisible()); + BasicCompartment classifiers2 = findCompartment(interface2, INTERFACE_INTERFACEIFIER_COMPARTMENT_TYPE); + Assert.assertFalse("Classifiers compartment should be hidden", classifiers2.isVisible()); + } + + /* Test Class 3 */ + @Test + public void testCompartmentForceValue() { + //Test initial situation + Shape class3 = findShape("Class3"); + + //Check all compartments + for(View childNode : (List)class3.getChildren()) { + if(childNode instanceof BasicCompartment) { + Assert.assertFalse("All compartments from Class3 should be hidden", childNode.isVisible()); + } + } + + //We need an editingDomain for the ResetStyle operation + new TransactionalEditingDomainImpl(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), diagram.eResource().getResourceSet()); + + //Test resetStyle + ResetStyleHelper.resetStyle(Collections.singleton(class3)); + //Check only some specific compartments. Some style rules still hide the nestedClassifier compartment. The visibility of e.g. the ShapeCompartment is undetermined. + BasicCompartment attributesCompartment = findCompartment(class3, CLASS_ATTRIBUTE_COMPARTMENT_TYPE); + BasicCompartment operationsCompartment = findCompartment(class3, CLASS_OPERATION_COMPARTMENT_TYPE); + + Assert.assertTrue("Attributes compartment should be visible after the reset style", attributesCompartment.isVisible()); + Assert.assertTrue("Operations compartment should be visible after the reset style", operationsCompartment.isVisible()); + } + + /* Test apply style */ + @Test + //Currently fails. showTitle is not properly supported for BasicCompartments + //Unlike Compartment, BasicCompartment doesn't implement TitleStyle. Instead, + //it owns a specific instance of TitleStyle, which is not supported by the CSS Engine (?) + public void testShowAllCompartmentsTitles() { + //Initial state: title should be hidden + for(View childNode : (List)diagram.getChildren()) { + for(View compartment : (List)childNode.getChildren()) { + if(compartment instanceof BasicCompartment) { + TitleStyle titleStyle = (TitleStyle)compartment.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); + Assert.assertFalse("Title should be hidden", titleStyle.isShowTitle()); + } + } + } + + //Apply style + CustomStringStyleObservableList stylesList = new CustomStringStyleObservableList(diagram, null, "cssClass"); + stylesList.add("showTitleForAllCompartments"); + + //Check that all titles are visible + for(View childNode : (List)diagram.getChildren()) { + for(View compartment : (List)childNode.getChildren()) { + if(compartment instanceof BasicCompartment) { + TitleStyle titleStyle = (TitleStyle)compartment.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); + Assert.assertTrue("Title should be visible", titleStyle.isShowTitle()); + } + } + } + } + + + @After + public void dispose() { + Iterator iterator = diagram.eResource().getResourceSet().getResources().iterator(); + while(iterator.hasNext()) { + iterator.next().unload(); + iterator.remove(); + } + } + + private BasicCompartment findCompartment(Shape element, String type) { + for(View childNode : (List)element.getChildren()) { + if(type.equals(childNode.getType())) { + return (BasicCompartment)childNode; + } + } + + return null; + } + + private Shape findShape(String elementName) { + for(Object viewObject : diagram.getChildren()) { + View view = (View)viewObject; + if(view instanceof Shape && view.getElement() instanceof NamedElement) { + NamedElement element = (NamedElement)view.getElement(); + if(elementName.equals(element.getName())) { + return (Shape)view; + } + } + } + + Assert.fail("Cannot find the view associated to " + elementName); + return null; + } + +} -- cgit v1.2.3 From ade9d574e165b8b0dcd4dc717b68eb7a39bb3ceb Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Thu, 6 Feb 2014 16:00:07 +0100 Subject: 417396: [CSS] The CSS Engine shall support label visibility & mask https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Remove the manually defined contributions to NotationsTypesMap extension point - Update the compartments tests--- .../plugin.xml | 31 ---------------------- .../resources/stylesheets/compartments.css | 10 +++---- 2 files changed, 5 insertions(+), 36 deletions(-) (limited to 'tests') diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml index 343f2d1d9a5..45243f3c623 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml @@ -175,37 +175,6 @@ - - - - - - - - - - - - - - - - diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css index a07ea565036..13660016b20 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css @@ -7,22 +7,22 @@ showTitle: true; } -Interface > Compartment[kind=attribute], -Interface > Compartment[kind=nestedClassifier] { +Interface > Compartment[kind=Attribute], +Interface > Compartment[kind=NestedClassifier] { visible:false; } -Interface[ownedAttribute] > Compartment[kind=attribute]{ +Interface[ownedAttribute] > Compartment[kind=Attribute]{ visible:true; } -Compartment[kind=nestedClassifier] { +Compartment[kind=NestedClassifier] { visible: false; } /* Collapse the Attribute compartment if the Class contains a P1 attribute (Displayed) */ -Class[ownedAttribute~="P1"] > Compartment[kind=attribute]{ +Class[ownedAttribute~="P1"] > Compartment[kind=Attribute]{ collapsed: true; } -- cgit v1.2.3 From 25d1978314cda6257c58358916dc6b1f42d20172 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 7 Feb 2014 11:07:58 +0100 Subject: 417396: [CSS] The CSS Engine shall support label visibility & mask https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Update tests--- .../plugin.xml | 2 +- .../editpart/ShapeDisplayCompartmentEditPart.java | 4 +- .../common/providers/NotationLabelProvider.java | 13 ++- .../org.eclipse.papyrus.uml.diagram.css/plugin.xml | 114 +-------------------- ....eclipse.papyrus.infra.gmfdiag.css.tests.launch | 2 +- .../css/tests/tests/CSSCompartmentsTests.java | 12 ++- 6 files changed, 23 insertions(+), 124 deletions(-) (limited to 'tests') diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml index 45243f3c623..5faa3d62bbc 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml @@ -176,7 +176,7 @@ diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java index 8a31d568a5a..48c0b35f3d4 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java @@ -7,7 +7,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * + * * CEA LIST - Initial API and implementation * *****************************************************************************/ @@ -53,7 +53,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ShapeService; public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPart { /** Title of this compartment */ - public final static String COMPARTMENT_NAME = "shape"; // $NON-NLS-1$ + public final static String COMPARTMENT_NAME = "SymbolCompartment"; // $NON-NLS-1$ /** * Creates a new ShapeDisplayCompartmentEditPart diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java index 9beb2520610..cd8d0de611f 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (c) 2012 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 @@ -24,7 +24,9 @@ import org.eclipse.papyrus.infra.core.editorsfactory.PageIconsRegistry; import org.eclipse.papyrus.infra.core.extension.diagrameditor.PluggableEditorFactoryReader; import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider; import org.eclipse.papyrus.infra.gmfdiag.common.Activator; +import org.eclipse.papyrus.infra.gmfdiag.common.types.NotationTypesMap; import org.eclipse.swt.graphics.Image; +import org.eclipse.uml2.uml.NamedElement; import org.w3c.dom.Element; /** @@ -68,9 +70,9 @@ public class NotationLabelProvider extends EMFLabelProvider { } /** - * + * * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) - * + * * @param element * @return
    *
  • if element is a {@link NamedElement}, we return its name
  • @@ -85,6 +87,11 @@ public class NotationLabelProvider extends EMFLabelProvider { } if(element instanceof View) { // maybe it is a view of a compartment + String humanType = NotationTypesMap.instance.getHumanReadableType((View)element); + if(humanType != null) { + return humanType; + } + EditPart dummyEP = EditPartService.getInstance().createGraphicEditPart((View)element); if(dummyEP instanceof ResizableCompartmentEditPart) { return ((ResizableCompartmentEditPart)dummyEP).getCompartmentName(); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/plugin.xml index 6f317d68655..61d2dc7da72 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/plugin.xml @@ -7,117 +7,5 @@ factory="org.eclipse.papyrus.uml.diagram.css.dom.GMFUMLElementProviderFactory" order="50"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch index eb1de64a68e..7e6458447b4 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch @@ -23,7 +23,7 @@ - + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java index c311a50ca4e..96f7c5198cb 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java @@ -20,7 +20,9 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl; import org.eclipse.gmf.runtime.notation.BasicCompartment; import org.eclipse.gmf.runtime.notation.Diagram; @@ -43,9 +45,9 @@ import org.junit.Test; /** * Test case for Compartment-related styles and properties * See resources/model/compartmentsTest/model.di for details - * - * @author Camille Letavernier * + * @author Camille Letavernier + * */ public class CSSCompartmentsTests { @@ -147,15 +149,17 @@ public class CSSCompartmentsTests { //Check all compartments for(View childNode : (List)class3.getChildren()) { if(childNode instanceof BasicCompartment) { - Assert.assertFalse("All compartments from Class3 should be hidden", childNode.isVisible()); + Assert.assertFalse("All compartments from Class3 should be hidden. " + childNode.getType() + " is visible", childNode.isVisible()); } } //We need an editingDomain for the ResetStyle operation - new TransactionalEditingDomainImpl(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), diagram.eResource().getResourceSet()); + TransactionalEditingDomain domain = new TransactionalEditingDomainImpl(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), diagram.eResource().getResourceSet()); + diagram.eResource().getResourceSet().eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(domain)); //Test resetStyle ResetStyleHelper.resetStyle(Collections.singleton(class3)); + //Check only some specific compartments. Some style rules still hide the nestedClassifier compartment. The visibility of e.g. the ShapeCompartment is undetermined. BasicCompartment attributesCompartment = findCompartment(class3, CLASS_ATTRIBUTE_COMPARTMENT_TYPE); BasicCompartment operationsCompartment = findCompartment(class3, CLASS_OPERATION_COMPARTMENT_TYPE); -- cgit v1.2.3 From af0428c6072f0a3eea7fd5de262a1a1556257660 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 7 Feb 2014 17:19:14 +0100 Subject: 417396: [CSS] The CSS Engine shall support label visibility & mask https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Rename compartments to conform with UML2.5-beta2 specification, and unify naming--- .../plugin.xml | 2 +- .../editpart/ShapeDisplayCompartmentEditPart.java | 18 ++--- .../messages.properties | 78 +++++++++++----------- .../model/classdiagram.gmfgen | 74 ++++++++++---------- .../plugin.xml | 78 +++++++++++----------- .../messages.properties | 22 +++--- .../model/ComponentDiagram.gmfgen | 22 +++--- .../plugin.xml | 22 +++--- .../messages.properties | 54 +++++++-------- .../model/compositediagram.gmfgen | 54 +++++++-------- .../plugin.xml | 54 +++++++-------- .../messages.properties | 32 ++++----- .../model/profilediagram.gmfgen | 32 ++++----- .../plugin.xml | 32 ++++----- .../resources/stylesheets/compartments.css | 12 ++-- 15 files changed, 293 insertions(+), 293 deletions(-) (limited to 'tests') diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml index 5faa3d62bbc..45243f3c623 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml @@ -176,7 +176,7 @@ diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java index 48c0b35f3d4..f4ccf8421f2 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java @@ -53,11 +53,11 @@ import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ShapeService; public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPart { /** Title of this compartment */ - public final static String COMPARTMENT_NAME = "SymbolCompartment"; // $NON-NLS-1$ + public final static String COMPARTMENT_NAME = "symbol"; // $NON-NLS-1$ /** * Creates a new ShapeDisplayCompartmentEditPart - * + * * @param model * The resizable compartment view */ @@ -106,7 +106,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar /** * this method is used to set the ratio of the figure. * pay attention if the ratio is true, the only figure is displayed - * + * * @param maintainRatio */ protected void maintainRatio(boolean maintainRatio) { @@ -154,7 +154,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar * To be sure everything is clean, it removes all the current displayed shapes and then redraw all of the demanded shapes. This could be probably * improved in case of performance issues. *

    - * + * * @param contentPane * the figure where to add the new shapes */ @@ -242,7 +242,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar public class OneShapeLayoutManager extends AbstractLayout { /** - * + * * {@inheritDoc} */ @Override @@ -255,7 +255,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar } /** - * + * * {@inheritDoc} */ @Override @@ -343,7 +343,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar /** * Gets the diagram event broker from the editing domain. - * + * * @return the diagram event broker */ protected DiagramEventBroker getDiagramEventBroker() { @@ -356,7 +356,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar /** * Returns the view controlled by the host edit part - * + * * @return the view controlled by the host edit part */ protected View getView() { @@ -377,7 +377,7 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar } /** - * + * * @param currentView * @return the current Style that reperesent the boder */ diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/messages.properties index b905e4e3897..0bc226ea9e0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/messages.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/messages.properties @@ -164,45 +164,45 @@ createTemplateBinding21CreationTool_title=TemplateBinding createTemplateBinding21CreationTool_desc=Create a TemplateBinding createContextLink22CreationTool_title=ContextLink createContextLink22CreationTool_desc=Creation of a context link for a Constraint -ClassAttributeCompartmentEditPartCN_title=AttributeCompartment -ClassOperationCompartmentEditPartCN_title=OperationCompartment -ClassNestedClassifierCompartmentEditPartCN_title=NestedClassifierCompartment -ComponentAttributeCompartmentEditPartCN_title=AttributeCompartment -ComponentOperationCompartmentEditPartCN_title=OperationCompartment -ComponentNestedClassifierCompartmentEditPartCN_title=NestedClassifierCompartment -SignalAttributeCompartmentEditPartCN_title=AttributeCompartment -InterfaceAttributeCompartmentEditPartCN_title=AttributeCompartment -InterfaceOperationCompartmentEditPartCN_title=OperationCompartment -InterfaceNestedClassifierCompartmentEditPartCN_title=NestedClassifierCompartment -PrimitiveTypeAttributeCompartmentEditPartCN_title=AttributeCompartment -PrimitiveTypeOperationCompartmentEditPartCN_title=OperationCompartment -DataTypeAttributeCompartmentEditPartCN_title=AttributeCompartment -DataTypeOperationCompartmentEditPartCN_title=OperationCompartment -ModelPackageableElementCompartmentEditPartCN_title=PackageableElementCompartment -PackagePackageableElementCompartmentEditPartCN_title=PackageableElementCompartment -EnumerationEnumerationLiteralCompartmentEditPartCN_title=EnumerationLiteralCompartment -InstanceSpecificationSlotCompartmentEditPartCN_title=SlotCompartment -ClassAttributeCompartmentEditPart_title=AttributeCompartment -ClassOperationCompartmentEditPart_title=OperationCompartment -ClassNestedClassifierCompartmentEditPart_title=NestedClassifierCompartment -ComponentAttributeCompartmentEditPart_title=AttributeCompartment -ComponentOperationCompartmentEditPart_title=OperationCompartment -ComponentNestedClassifierCompartmentEditPart_title=NestedClassifierCompartment -InterfaceAttributeCompartmentEditPart_title=AttributeCompartment -InterfaceOperationCompartmentEditPart_title=OperationCompartment -InterfaceNestedClassifierCompartmentEditPart_title=NestedClassifierCompartment -PrimitiveTypeAttributeCompartmentEditPart_title=AttributeCompartment -PrimitiveTypeOperationCompartmentEditPart_title=OperationCompartment -DataTypeAttributeCompartmentEditPart_title=AttributeCompartment -DataTypeOperationCompartmentEditPart_title=OperationCompartment -AssociationClassAttributeCompartmentEditPart_title=AttributeCompartment -InstanceSpecificationSlotCompartmentEditPart_title=SlotCompartment -SignalAttributeCompartmentEditPart_title=AttributeCompartment -ModelPackageableElementCompartmentEditPartTN_title=PackageableElementCompartment -PackagePackageableElementCompartmentEditPart_title=PackageableElementCompartment -EnumerationEnumerationLiteralCompartmentEditPart_title=EnumerationLiteralCompartment -AssociationClassOperationCompartmentEditPart_title=OperationCompartment -AssociationClassNestedClassifierCompartmentEditPart_title=NestedClassifierCompartment +ClassAttributeCompartmentEditPartCN_title=attributes +ClassOperationCompartmentEditPartCN_title=operations +ClassNestedClassifierCompartmentEditPartCN_title=nested classifiers +ComponentAttributeCompartmentEditPartCN_title=attributes +ComponentOperationCompartmentEditPartCN_title=operations +ComponentNestedClassifierCompartmentEditPartCN_title=nested classifiers +SignalAttributeCompartmentEditPartCN_title=attributes +InterfaceAttributeCompartmentEditPartCN_title=attributes +InterfaceOperationCompartmentEditPartCN_title=operations +InterfaceNestedClassifierCompartmentEditPartCN_title=nested classifiers +PrimitiveTypeAttributeCompartmentEditPartCN_title=attributes +PrimitiveTypeOperationCompartmentEditPartCN_title=operations +DataTypeAttributeCompartmentEditPartCN_title=attributes +DataTypeOperationCompartmentEditPartCN_title=operations +ModelPackageableElementCompartmentEditPartCN_title=packaged elements +PackagePackageableElementCompartmentEditPartCN_title=packaged elements +EnumerationEnumerationLiteralCompartmentEditPartCN_title=literals +InstanceSpecificationSlotCompartmentEditPartCN_title=slots +ClassAttributeCompartmentEditPart_title=attributes +ClassOperationCompartmentEditPart_title=operations +ClassNestedClassifierCompartmentEditPart_title=nested classifiers +ComponentAttributeCompartmentEditPart_title=attributes +ComponentOperationCompartmentEditPart_title=operations +ComponentNestedClassifierCompartmentEditPart_title=nested classifiers +InterfaceAttributeCompartmentEditPart_title=attributes +InterfaceOperationCompartmentEditPart_title=operations +InterfaceNestedClassifierCompartmentEditPart_title=nested classifiers +PrimitiveTypeAttributeCompartmentEditPart_title=attributes +PrimitiveTypeOperationCompartmentEditPart_title=operations +DataTypeAttributeCompartmentEditPart_title=attributes +DataTypeOperationCompartmentEditPart_title=operations +AssociationClassAttributeCompartmentEditPart_title=attributes +InstanceSpecificationSlotCompartmentEditPart_title=slots +SignalAttributeCompartmentEditPart_title=attributes +ModelPackageableElementCompartmentEditPartTN_title=packaged elements +PackagePackageableElementCompartmentEditPart_title=packaged elements +EnumerationEnumerationLiteralCompartmentEditPart_title=literals +AssociationClassOperationCompartmentEditPart_title=operations +AssociationClassNestedClassifierCompartmentEditPart_title=nested classifiers RedefinableTemplateSignatureTemplateParameterCompartmentEditPart_title=TemplateParameterCompartment TemplateSignatureTemplateParameterCompartmentEditPart_title=TemplateParameterCompartment CommandName_OpenDiagram=Open Diagram diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen index 99e7e7ab901..60b51dfe447 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen @@ -6889,7 +6889,7 @@ itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.0" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.33"> @@ -6912,7 +6912,7 @@ itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.9" - title="OperationCompartment" + title="operations" node="/0/@diagram/@childNodes.33"> @@ -6935,7 +6935,7 @@ itemSemanticEditPolicyClassName="ClassNestedClassifierCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassNestedClassifierCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.50" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@childNodes.33"> @@ -6962,7 +6962,7 @@ itemSemanticEditPolicyClassName="ComponentAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ComponentAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.26"> @@ -6985,7 +6985,7 @@ itemSemanticEditPolicyClassName="ComponentOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ComponentOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.19" - title="OperationCompartment" + title="operations" node="/0/@diagram/@childNodes.26"> @@ -7008,7 +7008,7 @@ itemSemanticEditPolicyClassName="ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ComponentNestedClassifierCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.51" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@childNodes.26"> @@ -7035,7 +7035,7 @@ itemSemanticEditPolicyClassName="SignalAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="SignalAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.27"> @@ -7058,7 +7058,7 @@ itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.28"> @@ -7081,7 +7081,7 @@ itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.20" - title="OperationCompartment" + title="operations" node="/0/@diagram/@childNodes.28"> @@ -7104,7 +7104,7 @@ itemSemanticEditPolicyClassName="InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InterfaceNestedClassifierCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.52" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@childNodes.28"> @@ -7131,7 +7131,7 @@ itemSemanticEditPolicyClassName="PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PrimitiveTypeAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.4" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.34"> @@ -7154,7 +7154,7 @@ itemSemanticEditPolicyClassName="PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PrimitiveTypeOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.12" - title="OperationCompartment" + title="operations" node="/0/@diagram/@childNodes.34"> @@ -7177,7 +7177,7 @@ itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.5" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.35"> @@ -7200,7 +7200,7 @@ itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.13" - title="OperationCompartment" + title="operations" node="/0/@diagram/@childNodes.35"> @@ -7223,7 +7223,7 @@ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32" - title="PackageableElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.29" listLayout="false"> @@ -7256,7 +7256,7 @@ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32" - title="PackageableElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.31" listLayout="false"> @@ -7312,7 +7312,7 @@ itemSemanticEditPolicyClassName="InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.21" - title="SlotCompartment" + title="slots" node="/0/@diagram/@childNodes.25"> @@ -7335,7 +7335,7 @@ itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.0" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.11"> @@ -7358,7 +7358,7 @@ itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.9" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.11"> @@ -7381,7 +7381,7 @@ itemSemanticEditPolicyClassName="ClassNestedClassifierCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassNestedClassifierCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.50" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@topLevelNodes.11"> @@ -7412,7 +7412,7 @@ itemSemanticEditPolicyClassName="ComponentAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ComponentAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.4"> @@ -7435,7 +7435,7 @@ itemSemanticEditPolicyClassName="ComponentOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ComponentOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.19" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.4"> @@ -7458,7 +7458,7 @@ itemSemanticEditPolicyClassName="ComponentNestedClassifierCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ComponentNestedClassifierCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.51" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@topLevelNodes.4"> @@ -7489,7 +7489,7 @@ itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.6"> @@ -7512,7 +7512,7 @@ itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.20" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.6"> @@ -7535,7 +7535,7 @@ itemSemanticEditPolicyClassName="InterfaceNestedClassifierCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InterfaceNestedClassifierCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.52" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@topLevelNodes.6"> @@ -7566,7 +7566,7 @@ itemSemanticEditPolicyClassName="PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="PrimitiveTypeAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.4" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.12"> @@ -7589,7 +7589,7 @@ itemSemanticEditPolicyClassName="PrimitiveTypeOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="PrimitiveTypeOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.12" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.12"> @@ -7612,7 +7612,7 @@ itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.5" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.13"> @@ -7635,7 +7635,7 @@ itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.13" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.13"> @@ -7658,7 +7658,7 @@ itemSemanticEditPolicyClassName="AssociationClassAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="AssociationClassAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.1"> @@ -7681,7 +7681,7 @@ itemSemanticEditPolicyClassName="InstanceSpecificationSlotCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InstanceSpecificationSlotCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.21" - title="SlotCompartment" + title="slots" node="/0/@diagram/@topLevelNodes.3"> @@ -7704,7 +7704,7 @@ itemSemanticEditPolicyClassName="SignalAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="SignalAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.5"> @@ -7727,7 +7727,7 @@ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyTN" canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyTN" childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32" - title="PackageableElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.7" listLayout="false"> @@ -7760,7 +7760,7 @@ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32" - title="PackageableElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.9" listLayout="false"> @@ -7816,7 +7816,7 @@ itemSemanticEditPolicyClassName="AssociationClassOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="AssociationClassOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.10" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.1"> @@ -7839,7 +7839,7 @@ itemSemanticEditPolicyClassName="AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="AssociationClassNestedClassifierCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.7" - title="NestedClassifierCompartment" + title="nested classifiers" node="/0/@diagram/@topLevelNodes.1"> diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml index 1ce486bd10a..fdc18ad9e1d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml @@ -3025,197 +3025,197 @@ diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/messages.properties index ebe249e6611..1b3c0535d99 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/messages.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/messages.properties @@ -82,29 +82,29 @@ createInterfaceRealizationCreationTool_title=Interface Realization createInterfaceRealizationCreationTool_desc=Create an Interface Realization createComponentRealizationCreationTool_title=Component Realization createComponentRealizationCreationTool_desc=Create a Component Realization -ComponentCompositeCompartmentEditPart_title=CompositeCompartment -ModelPackageableElementCompartmentEditPart_title=ModelElementCompartment -PackagePackageableElementCompartmentEditPart_title=PackageableElementCompartment -ModelPackageableElementCompartmentEditPartCN_title=ModelElementCompartment -PackagePackageableElementCompartmentEditPartCN_title=PackageableElementCompartment -ComponentCompositeCompartmentEditPartCN_title=CompositeCompartmentCN -ComponentCompositeCompartmentEditPartPCN_title=CompositeCompartmentPCN +ComponentCompositeCompartmentEditPart_title=packaged elements +ModelPackageableElementCompartmentEditPart_title=packaged elements +PackagePackageableElementCompartmentEditPart_title=packaged elements +ModelPackageableElementCompartmentEditPartCN_title=packaged elements +PackagePackageableElementCompartmentEditPartCN_title=packaged elements +ComponentCompositeCompartmentEditPartCN_title=packaged elements +ComponentCompositeCompartmentEditPartPCN_title=packaged elements CommandName_OpenDiagram=Open Diagram MessageFormatParser_InvalidInputError=Invalid input at {0} UMLModelingAssistantProviderTitle=Select domain model element UMLModelingAssistantProviderMessage=Available domain model elements: createRectancleInterfaceCreationTool_title=Interface createRectancleInterfaceCreationTool_desc=Create an Interface -InterfaceAttributeCompartmentEditPart_title=AttributeCompartment +InterfaceAttributeCompartmentEditPart_title=attributes createPropertyCreationTool_title=Property createPropertyCreationTool_desc=Create a Property createOperationCreationTool_title=Operation createOperationCreationTool_desc=Create an Operation -InterfaceOperationCompartmentEditPart_title=OperationCompartment +InterfaceOperationCompartmentEditPart_title=operations createReceptionCreationTool_title=Reception createReceptionCreationTool_desc=Create a Reception -InterfaceAttributeCompartmentEditPartCN_title=AttributeCompartment -InterfaceOperationCompartmentEditPartCN_title=OperationCompartment +InterfaceAttributeCompartmentEditPartCN_title=attributes +InterfaceOperationCompartmentEditPartCN_title=operations NodesGroup_title=Nodes NodesGroup_desc=Diagram Nodes LinksGroup_title=Links diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen index 2dce7a75f3e..a4b1f326dd8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen @@ -2634,7 +2634,7 @@ itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.12" - title="CompositeCompartment" + title="packaged elements" hideIfEmpty="false" node="/0/@diagram/@topLevelNodes.1" listLayout="false"> @@ -2659,7 +2659,7 @@ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11" - title="ModelElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.2" listLayout="false"> @@ -2684,7 +2684,7 @@ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.11" - title="PackageableElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.3" listLayout="false"> @@ -2709,7 +2709,7 @@ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11" - title="ModelElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.1" listLayout="false"> @@ -2734,7 +2734,7 @@ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11" - title="PackageableElementCompartment" + title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.2" listLayout="false"> @@ -2759,7 +2759,7 @@ itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.12" - title="CompositeCompartmentCN" + title="packaged elements" hideIfEmpty="false" node="/0/@diagram/@childNodes.4" listLayout="false"> @@ -2784,7 +2784,7 @@ itemSemanticEditPolicyClassName="ComponentCompositeCompartmentItemSemanticEditPolicyPCN" canonicalEditPolicyClassName="ComponentCompositeCompartmentCanonicalEditPolicyPCN" childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.12" - title="CompositeCompartmentPCN" + title="packaged elements" hideIfEmpty="false" node="/0/@diagram/@childNodes.5" listLayout="false"> @@ -2809,7 +2809,7 @@ itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.8" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@topLevelNodes.4"> @@ -2824,7 +2824,7 @@ itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10" - title="OperationCompartment" + title="operations" node="/0/@diagram/@topLevelNodes.4"> @@ -2839,7 +2839,7 @@ itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.8" - title="AttributeCompartment" + title="attributes" node="/0/@diagram/@childNodes.3"> @@ -2854,7 +2854,7 @@ itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10" - title="OperationCompartment" + title="operations" node="/0/@diagram/@childNodes.3"> diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml index da9465709d7..35b9385e01c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml @@ -1563,57 +1563,57 @@ diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties index 10ee82ea2f4..b9b24f41ec6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/messages.properties @@ -105,37 +105,37 @@ createRepresentationCreationTool_title=Representation createRepresentationCreationTool_desc=Create new representation for an InformationItem createInformationFlowCreationTool_title=InformationFlow createInformationFlowCreationTool_desc=Create new InformationFlow -DataTypeAttributeCompartmentEditPart_title=properties +DataTypeAttributeCompartmentEditPart_title=attributes DataTypeOperationCompartmentEditPart_title=operations -DataTypeAttributeCompartmentEditPartCN_title=properties +DataTypeAttributeCompartmentEditPartCN_title=attributes DataTypeOperationCompartmentEditPartCN_title=operations EnumerationEnumerationLiteralCompartmentEditPart_title=literals EnumerationEnumerationLiteralCompartmentEditPartCN_title=literals -ActivityCompositeCompartmentEditPartCN_title=structure -InteractionCompositeCompartmentEditPartCN_title=structure -ProtocolStateMachineCompositeCompartmentEditPartCN_title=structure -StateMachineCompositeCompartmentEditPartCN_title=structure -FunctionBehaviorCompositeCompartmentEditPartCN_title=structure -OpaqueBehaviorCompositeCompartmentEditPartCN_title=structure -ComponentCompositeCompartmentEditPartCN_title=structure -DeviceCompositeCompartmentEditPartCN_title=structure -ExecutionEnvironmentCompositeCompartmentEditPartCN_title=structure -NodeCompositeCompartmentEditPartCN_title=structure -ClassCompositeCompartmentEditPartCN_title=structure -CollaborationCompositeCompartmentEditPartCN_title=structure -ActivityCompositeCompartmentEditPart_title=structure -InteractionCompositeCompartmentEditPart_title=structure -ProtocolStateMachineCompositeCompartmentEditPart_title=structure -StateMachineCompositeCompartmentEditPart_title=structure -FunctionBehaviorCompositeCompartmentEditPart_title=structure -OpaqueBehaviorCompositeCompartmentEditPart_title=structure -ComponentCompositeCompartmentEditPart_title=structure -DeviceCompositeCompartmentEditPart_title=structure -ExecutionEnvironmentCompositeCompartmentEditPart_title=structure -NodeCompositeCompartmentEditPart_title=structure -ClassCompositeCompartmentEditPart_title=structure -CollaborationCompositeCompartmentEditPart_title=structure -PropertyPartCompartmentEditPartCN_title=structure +ActivityCompositeCompartmentEditPartCN_title=internal structure +InteractionCompositeCompartmentEditPartCN_title=internal structure +ProtocolStateMachineCompositeCompartmentEditPartCN_title=internal structure +StateMachineCompositeCompartmentEditPartCN_title=internal structure +FunctionBehaviorCompositeCompartmentEditPartCN_title=internal structure +OpaqueBehaviorCompositeCompartmentEditPartCN_title=internal structure +ComponentCompositeCompartmentEditPartCN_title=internal structure +DeviceCompositeCompartmentEditPartCN_title=internal structure +ExecutionEnvironmentCompositeCompartmentEditPartCN_title=internal structure +NodeCompositeCompartmentEditPartCN_title=internal structure +ClassCompositeCompartmentEditPartCN_title=internal structure +CollaborationCompositeCompartmentEditPartCN_title=internal structure +ActivityCompositeCompartmentEditPart_title=internal structure +InteractionCompositeCompartmentEditPart_title=internal structure +ProtocolStateMachineCompositeCompartmentEditPart_title=internal structure +StateMachineCompositeCompartmentEditPart_title=internal structure +FunctionBehaviorCompositeCompartmentEditPart_title=internal structure +OpaqueBehaviorCompositeCompartmentEditPart_title=internal structure +ComponentCompositeCompartmentEditPart_title=internal structure +DeviceCompositeCompartmentEditPart_title=internal structure +ExecutionEnvironmentCompositeCompartmentEditPart_title=internal structure +NodeCompositeCompartmentEditPart_title=internal structure +ClassCompositeCompartmentEditPart_title=internal structure +CollaborationCompositeCompartmentEditPart_title=internal structure +PropertyPartCompartmentEditPartCN_title=internal structure CommandName_OpenDiagram=Open Diagram MessageFormatParser_InvalidInputError=Invalid input at {0} UMLModelingAssistantProviderTitle=Select domain model element diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen index 90ff2fde591..83ddf09b6ec 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen @@ -3374,7 +3374,7 @@ - + @@ -3386,7 +3386,7 @@ - + @@ -3410,7 +3410,7 @@ - + @@ -3418,7 +3418,7 @@ - + @@ -3426,7 +3426,7 @@ - + @@ -3434,7 +3434,7 @@ - + @@ -3442,7 +3442,7 @@ - + @@ -3450,7 +3450,7 @@ - + @@ -3458,7 +3458,7 @@ - + @@ -3466,7 +3466,7 @@ - + @@ -3474,7 +3474,7 @@ - + @@ -3482,7 +3482,7 @@ - + @@ -3490,7 +3490,7 @@ - + @@ -3498,7 +3498,7 @@ - + @@ -3506,7 +3506,7 @@ - + @@ -3514,7 +3514,7 @@ - + @@ -3522,7 +3522,7 @@ - + @@ -3530,7 +3530,7 @@ - + @@ -3538,7 +3538,7 @@ - + @@ -3546,7 +3546,7 @@ - + @@ -3554,7 +3554,7 @@ - + @@ -3562,7 +3562,7 @@ - + @@ -3570,7 +3570,7 @@ - + @@ -3578,7 +3578,7 @@ - + @@ -3586,7 +3586,7 @@ - + @@ -3594,7 +3594,7 @@ - + @@ -3602,7 +3602,7 @@ - + diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml index ef6341e34c4..69b8c144132 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml @@ -2359,7 +2359,7 @@ @@ -2369,7 +2369,7 @@ @@ -2389,127 +2389,127 @@ diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties index 5589ac3550f..b14ec3bbd19 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties @@ -87,22 +87,22 @@ createEnumerationLiteral3CreationTool_title=EnumerationLiteral createEnumerationLiteral3CreationTool_desc=Add new EnumerationLiteral createContextLink6CreationTool_title=ContextLink createContextLink6CreationTool_desc=Creation of a context link for a Constraint -PackagePackageableElementCompartmentEditPart_title=PackageableElementCompartment -PackagePackageableElementCompartmentEditPartCN_title=PackageableElementCompartment -ProfilePackageableElementCompartmentEditPartTN_title=ProfilePackageableElementCompartment -ProfilePackageableElementCompartmentEditPartCN_title=ProfilePackageableElementCompartment -StereotypeAttributeCompartmentEditPart_title=AttributeCompartment -StereotypeAttributeCompartmentEditPartCN_title=AttributeCompartment -StereotypeOperationCompartmentEditPart_title=OperationCompartment -StereotypeOperationCompartmentEditPartCN_title=OperationCompartment -ModelPackageableElementCompartmentEditPartTN_title=ModelElementCompartment -ModelPackageableElementCompartmentEditPartCN_title=ModelElementCompartment -EnumerationEnumerationLiteralCompartmentEditPartCN_title=EnumerationEnumerationLiteral -EnumerationEnumerationLiteralCompartmentEditPart_title=EnumerationEnumerationLiteral -DataTypeAttributeCompartmentEditPart_title=DataTypeAttributeCompartment -DataTypeAttributeCompartmentEditPartCN_title=DataTypeAttributeCompartment -DataTypeOperationCompartmentEditPart_title=DataTypeOperationCompartment -DataTypeOperationCompartmentEditPartCN_title=DataTypeOperationCompartment +PackagePackageableElementCompartmentEditPart_title=packaged elements +PackagePackageableElementCompartmentEditPartCN_title=packaged elements +ProfilePackageableElementCompartmentEditPartTN_title=packaged elements +ProfilePackageableElementCompartmentEditPartCN_title=packaged elements +StereotypeAttributeCompartmentEditPart_title=attributes +StereotypeAttributeCompartmentEditPartCN_title=attributes +StereotypeOperationCompartmentEditPart_title=operations +StereotypeOperationCompartmentEditPartCN_title=operations +ModelPackageableElementCompartmentEditPartTN_title=packaged elements +ModelPackageableElementCompartmentEditPartCN_title=packaged elements +EnumerationEnumerationLiteralCompartmentEditPartCN_title=literals +EnumerationEnumerationLiteralCompartmentEditPart_title=literals +DataTypeAttributeCompartmentEditPart_title=attributes +DataTypeAttributeCompartmentEditPartCN_title=attributes +DataTypeOperationCompartmentEditPart_title=operations +DataTypeOperationCompartmentEditPartCN_title=operations CommandName_OpenDiagram=Open Diagram NavigatorActionProvider_OpenDiagramActionName=Open Diagram MessageFormatParser_InvalidInputError=Invalid input at {0} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen index 97ba2a29b47..c5b9d930930 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen @@ -1101,59 +1101,59 @@ - + - + - + - + - + - + - + - + - + @@ -1161,7 +1161,7 @@ - + @@ -1169,37 +1169,37 @@ - + - + - + - + - + - + diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml index 19d7b6f9d52..6c32fc5b2e7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml @@ -1541,82 +1541,82 @@ diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css index 13660016b20..fe0cb1f18a7 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css @@ -7,22 +7,22 @@ showTitle: true; } -Interface > Compartment[kind=Attribute], -Interface > Compartment[kind=NestedClassifier] { +Interface > Compartment[kind=attributes], +Interface > Compartment[kind=nestedclassifiers] { visible:false; } -Interface[ownedAttribute] > Compartment[kind=Attribute]{ +Interface[ownedAttribute] > Compartment[kind=attributes]{ visible:true; } -Compartment[kind=NestedClassifier] { +Compartment[kind=nestedclassifiers] { visible: false; } /* Collapse the Attribute compartment if the Class contains a P1 attribute (Displayed) */ -Class[ownedAttribute~="P1"] > Compartment[kind=Attribute]{ +Class[ownedAttribute~="P1"] > Compartment[kind=attributes]{ collapsed: true; } @@ -30,7 +30,7 @@ Enumeration > Compartment { collapsed: true; } -Enumeration > Compartment[kind=EnUmerAtionLiteRal]{ /* Case insensitive */ +Enumeration > Compartment[kind=LiteRalS]{ /* Case insensitive */ collapsed: false; } -- cgit v1.2.3 From 2729a7622507f39b9fa416fa07ee5f8579723e71 Mon Sep 17 00:00:00 2001 From: Vincent Lorenzo Date: Wed, 12 Feb 2014 17:24:31 +0100 Subject: Apply bugfox from B. Maggi on master (already applied on branch (see commit id in following text) e8fb604a0762987da518649578bbee6308742323 Use DiagramCommandStack to allow editPart creation notification (used when dropping a link create a view for a (source or target) node) 58f0eb6713f732753ab262d88cd13b2464aeadcc Bug 427271 - [SysML BDD] Can no more draw associations between a Block and an Actor. f86c1d8b36eb37cee0122e4de920ed71a6f952bc Bug 406290 - [SysML IBD] When the type of a part or a reference changes the nestedConnectors linked to an internal component of the part/refrence are hidden but are not deleted from the model. When destroying a part or changing its type, destroying all connectors that reference this part in NestedConnectorEnd.--- .../META-INF/MANIFEST.MF | 3 +- .../advice/AssociationNoneEditHelperAdvice.java | 6 +- .../helper/advice/PropertyEditHelperAdvice.java | 164 ++++++++++++++------- .../sysml/service/types/utils/ConnectorUtils.java | 30 ++++ .../eclipse/papyrus/sysml/util/SysmlResource.java | 9 +- .../internalblock/tests/utils/TestUtils.java | 8 +- 6 files changed, 159 insertions(+), 61 deletions(-) (limited to 'tests') diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF index 8a2fcd1db35..c145eb447d2 100644 --- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF +++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF @@ -11,7 +11,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.uml2.uml.profile.l2;bundle-version="1.0.0", org.eclipse.core.expressions, org.eclipse.papyrus.infra.tools;bundle-version="1.0.0", - org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0" + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0", + org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0" Export-Package: org.eclipse.papyrus.sysml.service.types, org.eclipse.papyrus.sysml.service.types.command, org.eclipse.papyrus.sysml.service.types.element, diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java index 0f69b4d04e0..2b9587b3122 100644 --- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java +++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java @@ -85,14 +85,12 @@ public class AssociationNoneEditHelperAdvice extends AssociationEditHelperAdvice * @throws ExecutionException */ protected Property createTargetProperty(Property targetProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { - addSourceInModel(targetProperty, propertyContainer, propertyType, association); setPropertyType(targetProperty, propertyType, editingDomain, progressMonitor, info); setPropertyName(targetProperty); return targetProperty; } protected Property createSourceProperty(Property sourceProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { - addTargetInModel(sourceProperty, propertyContainer, propertyType, association); setPropertyType(sourceProperty, propertyType, editingDomain, progressMonitor, info); setPropertyName(sourceProperty); return sourceProperty; @@ -216,6 +214,8 @@ public class AssociationNoneEditHelperAdvice extends AssociationEditHelperAdvice association.getMemberEnds().add(sourceProperty); // Create source and target ends + addSourceInModel(targetProperty, sourceType, targetType, association); + addTargetInModel(sourceProperty, targetType, sourceType, association); createTargetProperty(targetProperty, sourceType, targetType, association, request.getEditingDomain(), progressMonitor, info); configureSourceProperty(targetProperty); createSourceProperty(sourceProperty, targetType, sourceType, association, request.getEditingDomain(), progressMonitor, info); @@ -230,4 +230,4 @@ public class AssociationNoneEditHelperAdvice extends AssociationEditHelperAdvice } }; } -} +} \ No newline at end of file diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java index fd24bbb36cf..8b6dda12852 100644 --- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java +++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCo import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; @@ -44,11 +45,13 @@ import org.eclipse.papyrus.sysml.constraints.ConstraintProperty; import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage; import org.eclipse.papyrus.sysml.service.types.Activator; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; +import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils; import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil; import org.eclipse.papyrus.uml.service.types.utils.ElementUtil; import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper; import org.eclipse.swt.widgets.Display; import org.eclipse.uml2.uml.Association; +import org.eclipse.uml2.uml.Connector; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Port; import org.eclipse.uml2.uml.Property; @@ -78,23 +81,22 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { @SuppressWarnings("unchecked") @Override protected ICommand getBeforeSetCommand(SetRequest request) { - ICommand gmfCommand = super.getBeforeSetCommand(request); + ICommand gmfCommand = super.getBeforeSetCommand(request); EObject elementToEdit = request.getElementToEdit(); - if((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && - (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (request.getValue() instanceof Type)) { + if((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (request.getValue() instanceof Type)) { Property propertyToEdit = (Property)elementToEdit; // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied - if (request.getValue() instanceof org.eclipse.uml2.uml.Class) { + if(request.getValue() instanceof org.eclipse.uml2.uml.Class) { ICommand stereotypeApplicationCommand = getConstraintPropertyStereotypeApplicationCommand(propertyToEdit, (org.eclipse.uml2.uml.Class)request.getValue(), request); gmfCommand = CompositeCommand.compose(gmfCommand, stereotypeApplicationCommand); } // Exclude ConstraintParameter (simple property without ConstraintProperty stereotype owned by a ConstraintBlock) - if (propertyToEdit.eContainer() instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication((Element)propertyToEdit.eContainer(), ConstraintBlock.class) != null) { - if (UMLUtil.getStereotypeApplication(propertyToEdit, ConstraintProperty.class) == null) { + if(propertyToEdit.eContainer() instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication((Element)propertyToEdit.eContainer(), ConstraintBlock.class) != null) { + if(UMLUtil.getStereotypeApplication(propertyToEdit, ConstraintProperty.class) == null) { return gmfCommand; } } @@ -103,19 +105,16 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { // The edited property has to be related to a SysML association if((relatedAssociation == null) || !(ElementUtil.hasNature(relatedAssociation, SysMLElementTypes.SYSML_NATURE))) { - + // If no association exist and the new type is a Block // (not a ConstraintBlock => a property typed by a ConstraintBlock is a ConstraintProperty, not a Part neither a Reference), // add the association - if ((relatedAssociation == null) - && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue()) - && !((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) request.getValue()) - && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(propertyToEdit.eContainer())) { - + if((relatedAssociation == null) && ((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches((Type)request.getValue()) && !((ISpecializationType)SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type)request.getValue()) && ((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(propertyToEdit.eContainer())) { + ICommand addAssociationCommand = getCreatePartAssociationCommand((org.eclipse.uml2.uml.Class)propertyToEdit.eContainer(), propertyToEdit, (org.eclipse.uml2.uml.Class)request.getValue()); gmfCommand = CompositeCommand.compose(gmfCommand, addAssociationCommand); } - + return gmfCommand; } @@ -135,10 +134,10 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { // If the new type is not a block, destroy related association // This must be done only if the setting of the property type is not part of an association re-orient (hence after the previous code-block), // otherwise there is no legitimate reason to destroy the existing association while re-orienting it. - if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue()) && propertyToEdit.getType() != null) { + if(!((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches((Type)request.getValue()) && propertyToEdit.getType() != null) { ICommand destroyCommand = getDestroyPartAssociationCommand(relatedAssociation, propertyToEdit); gmfCommand = CompositeCommand.compose(gmfCommand, destroyCommand); - + return gmfCommand; } @@ -153,6 +152,73 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { return gmfCommand; } + /** + * + * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest) + * + * @param setRequest + * @return + */ + @Override + protected ICommand getAfterSetCommand(SetRequest setRequest) { + ICommand afterSetCommand = super.getAfterSetCommand(setRequest); + EObject elementToEdit = setRequest.getElementToEdit(); + if((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && (setRequest.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (setRequest.getValue() instanceof Type)) { + afterSetCommand = getDestroyAssociatedNestedConnectorCommand((Property)elementToEdit, afterSetCommand); + } + return afterSetCommand; + } + + /** + * + * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest) + * + * @param destroyDependentsRequest + * @return + */ + @Override + protected ICommand getAfterDestroyDependentsCommand(DestroyDependentsRequest destroyDependentsRequest) { + ICommand afterDestroyDependentsCommand = super.getAfterDestroyDependentsCommand(destroyDependentsRequest); + EObject elementToDestroy = destroyDependentsRequest.getElementToDestroy(); + if(elementToDestroy instanceof Property) { + afterDestroyDependentsCommand = getDestroyAssociatedNestedConnectorCommand((Property)elementToDestroy, afterDestroyDependentsCommand); + } + return afterDestroyDependentsCommand; + } + + /** + * Create a destroy command for all connectors that have this property in their property path. + * + * @param property + * the part to be destroyed + * @param command + * @return + */ + private ICommand getDestroyAssociatedNestedConnectorCommand(Property property, ICommand command) { + List instancesFilteredByType = org.eclipse.papyrus.uml.tools.utils.ElementUtil.getInstancesFilteredByType(property.getModel(), Connector.class, null); + List connectorToDestroy = ConnectorUtils.filterConnectorByPropertyInNestedConnectorEnd(instancesFilteredByType, (Property)property); + for(Connector connector : connectorToDestroy) { + ICommand destroyConnectorCommand = getDestroyConnectorCommand(connector); + command = CompositeCommand.compose(command, destroyConnectorCommand); + } + return command; + } + + /** + * Create a connector destroy command. + * + * @param connector + * @return the connector destroy command + */ + private ICommand getDestroyConnectorCommand(Connector connector) { + DestroyElementRequest request = new DestroyElementRequest(connector, false); + IElementEditService provider = ElementEditServiceUtils.getCommandProvider(connector.eContainer()); + if(provider == null) { + return null; + } + return provider.getEditCommand(request); + } + /** * Create a re-factoring command related to a Property move. * @@ -168,16 +234,16 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { Association relatedAssociation = setProperty.getAssociation(); // Should not be null, test before calling method. - if (associationToRefactor.getMemberEnds().size() >= 2) { + if(associationToRefactor.getMemberEnds().size() >= 2) { // Re-orient the related association (do not use edit service to avoid infinite loop here) int direction = ReorientRelationshipRequest.REORIENT_TARGET; if(setProperty == associationToRefactor.getMemberEnds().get(1)) { direction = ReorientRelationshipRequest.REORIENT_SOURCE; } - + ReorientRelationshipRequest reorientRequest = new ReorientRelationshipRequest(relatedAssociation, (Type)request.getValue(), setProperty.eContainer(), direction); reorientRequest.addParameters(request.getParameters()); - + IElementEditService provider = ElementEditServiceUtils.getCommandProvider(relatedAssociation); if(provider != null) { return provider.getEditCommand(reorientRequest); @@ -186,36 +252,36 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { return null; } - + /** * Create a part association creation command. * * @return the part association creation command */ private ICommand getCreatePartAssociationCommand(final org.eclipse.uml2.uml.Class sourceBlock, final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock) { - + return new AbstractCommand("Create part association") { - + @Override protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { // TODO Auto-generated method stub return null; } - + @Override protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { // TODO Auto-generated method stub return null; } - + @Override protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { - Association association = UMLFactory.eINSTANCE.createAssociation(); - + Association association = UMLFactory.eINSTANCE.createAssociation(); + // Add the association in the model - org.eclipse.uml2.uml.Package container = (org.eclipse.uml2.uml.Package)EMFCoreUtil.getLeastCommonContainer(Arrays.asList(new EObject[]{sourceBlock, targetBlock}), UMLPackage.eINSTANCE.getPackage()); + org.eclipse.uml2.uml.Package container = (org.eclipse.uml2.uml.Package)EMFCoreUtil.getLeastCommonContainer(Arrays.asList(new EObject[]{ sourceBlock, targetBlock }), UMLPackage.eINSTANCE.getPackage()); container.getPackagedElements().add(association); - + // Use existing Property as source... association.getMemberEnds().add(sourceProperty); // ... and create the opposite (unnamed) Property @@ -226,35 +292,35 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { // Initialize the element name based on the created IElementType String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(UMLPackage.eINSTANCE.getAssociation().getName(), association.eContainer().eContents()); association.setName(initializedName); - + // Add SysML Nature on the new Association ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE); - - return CommandResult.newOKCommandResult(association) ; + + return CommandResult.newOKCommandResult(association); } }; } - + /** * Apply/remove the ConstraintProperty stereotype application * * @return the ConstraintProperty stereotype application command */ private ICommand getConstraintPropertyStereotypeApplicationCommand(final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock, final SetRequest request) { - + return new AbstractTransactionalCommand(request.getEditingDomain(), "Apply/Remove ConstraintProperty Stereotype", null) { - + @Override protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied ConstraintProperty constraintPropertyApplication = UMLUtil.getStereotypeApplication(sourceProperty, ConstraintProperty.class); - if (UMLUtil.getStereotypeApplication(targetBlock, ConstraintBlock.class) != null) { - if (constraintPropertyApplication == null) { + if(UMLUtil.getStereotypeApplication(targetBlock, ConstraintBlock.class) != null) { + if(constraintPropertyApplication == null) { StereotypeApplicationHelper.INSTANCE.applyStereotype(sourceProperty, ConstraintsPackage.eINSTANCE.getConstraintProperty()); // Remove representations Set memberViewsToDestroy = CrossReferencerUtil.getCrossReferencingViews(sourceProperty, null); - if (memberViewsToDestroy.size() != 0) { + if(memberViewsToDestroy.size() != 0) { final IPreferenceStore store = Activator.getDefault().getPreferenceStore(); final String DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY = "displayMessageForTypingActionPreferenceKey"; boolean contains = store.contains(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY); @@ -265,29 +331,23 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { final String hideValue = store.getString(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY); if(!hideValue.equals(MessageDialogWithToggle.ALWAYS)) { int size = memberViewsToDestroy.size(); - MessageDialogWithToggle.openInformation(Display.getDefault().getActiveShell(), - "Change Type Action", - "WARNING! Typing a Property by a ConstraintBlock make this property become a ConstraintProperty. ConstraintProperty have a specific representation. " - + "\nSo all representations of this property will be removed from the model (" + size + " occurence" + ((size > 1) ? "s" : "") + ")." - , "Don't show this dialog the next time", - false, store, DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY); + MessageDialogWithToggle.openInformation(Display.getDefault().getActiveShell(), "Change Type Action", "WARNING! Typing a Property by a ConstraintBlock make this property become a ConstraintProperty. ConstraintProperty have a specific representation. " + "\nSo all representations of this property will be removed from the model (" + size + " occurence" + ((size > 1) ? "s" : "") + ").", "Don't show this dialog the next time", false, store, DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY); } - + } - for (View view : memberViewsToDestroy) { + for(View view : memberViewsToDestroy) { final DestroyElementRequest destroyRequest = new DestroyElementRequest(request.getEditingDomain(), view, false); final IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(view); ICommand editCommand = commandProvider.getEditCommand(destroyRequest); editCommand.execute(progressMonitor, info); } } - } - else { - if (constraintPropertyApplication != null) { + } else { + if(constraintPropertyApplication != null) { StereotypeApplicationHelper.INSTANCE.removeFromContainmentList(sourceProperty, constraintPropertyApplication); } } - return CommandResult.newOKCommandResult(sourceProperty) ; + return CommandResult.newOKCommandResult(sourceProperty); } }; } @@ -299,17 +359,17 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { */ @SuppressWarnings("unchecked") private ICommand getDestroyPartAssociationCommand(Association partAssociation, Property propertyToEdit) { - + DestroyElementRequest request = new DestroyElementRequest(partAssociation, false); - List dependentsToKeep = Arrays.asList(new EObject[] { propertyToEdit }); + List dependentsToKeep = Arrays.asList(new EObject[]{ propertyToEdit }); request.getParameters().put(RequestParameterConstants.DEPENDENTS_TO_KEEP, dependentsToKeep); - + IElementEditService provider = ElementEditServiceUtils.getCommandProvider(partAssociation.eContainer()); if(provider == null) { return null; } ICommand destroyCommand = provider.getEditCommand(request); - + return destroyCommand; } } diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java index d9d723e6e10..4033a75abbd 100644 --- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java +++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.sysml.blocks.Block; @@ -428,4 +429,33 @@ public class ConnectorUtils extends org.eclipse.papyrus.uml.service.types.utils. } return true; } + + + + /** + * Filter connectors that have this property in their property path. + * @param connectors + * @param part + * @return connectors that have this property in their property path. + */ + public static List filterConnectorByPropertyInNestedConnectorEnd(List connectors, Property part) { + List res = new ArrayList(); + for(Connector connector : connectors) { + EList ends = connector.getEnds(); + for(ConnectorEnd connectorEnd : ends) { + NestedConnectorEnd stereotypeApplication = UMLUtil.getStereotypeApplication(connectorEnd, NestedConnectorEnd.class); + if (stereotypeApplication != null){ + EList propertyPath = stereotypeApplication.getPropertyPath(); + for(Property property : propertyPath) { + if (property.equals(part)){ + res.add(connector); + } + } + } + } + } + return res; + } + + } diff --git a/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java b/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java index b432ffae4c9..bf2230bd8c4 100644 --- a/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java +++ b/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java @@ -15,6 +15,12 @@ package org.eclipse.papyrus.sysml.util; import org.eclipse.papyrus.sysml.SysmlPackage; +/** + * For all deprecated : use org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication + * Ex : + * replace appliedStereotype = connectorEnd.getAppliedStereotype("SysML::Blocks::NestedConnectorEnd");connectorEnd.getStereotypeApplication(appliedStereotype); + * by org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication(element, NestedConnectorEnd.class); + */ public class SysmlResource { public static final String LIBRARIES_PATHMAP = "pathmap://SysML_LIBRARIES/"; //$NON-NLS-1$ @@ -27,6 +33,7 @@ public class SysmlResource { public static final String SYSML_PROFILE_URI = PROFILES_PATHMAP + "SysML.profile.uml"; //$NON-NLS-1$ + // Stereotypes ids @Deprecated public static String CONFORM_ID = "SysML::ModelElements::Conform"; @@ -62,7 +69,7 @@ public class SysmlResource { @Deprecated public static String VALUE_TYPE_ID = "SysML::Blocks::ValueType"; - + @Deprecated public static String NESTED_CONNECTOR_END_ID = "SysML::Blocks::NestedConnectorEnd"; diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java index e8f8220e9dd..09300f8df8b 100644 --- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java +++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java @@ -726,23 +726,23 @@ public class TestUtils { history.addOperationHistoryListener(historyChange); // Test execution historyEventType = OperationHistoryEvent.DONE; - EditorUtils.getCommandStack().execute(new GEFtoEMFCommandWrapper(command)); + EditorUtils.getDiagramCommandStack().execute(command); if(historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) { fail("Command execution failed ()"); } // Test undo historyEventType = OperationHistoryEvent.DONE; - EditorUtils.getCommandStack().undo(); + EditorUtils.getDiagramCommandStack().undo(); if(historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) { fail("Command undo failed ()"); } // Test redo historyEventType = OperationHistoryEvent.DONE; - EditorUtils.getCommandStack().redo(); + EditorUtils.getDiagramCommandStack().redo(); if(historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) { fail("Command redo failed ()"); } // Remove listener. history.removeOperationHistoryListener(historyChange); } -} +} \ No newline at end of file -- cgit v1.2.3 From 460dfc77532b3471d72d9a1cd263de8866b9b8e6 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Feb 2014 18:57:21 +0100 Subject: [Releng - CSS] Fix missing dependency to core.databinding --- .../org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF index 481cbb8fc50..915af9d0366 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF @@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.uml2.uml;bundle-version="4.0.0", org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0", org.junit;bundle-version="4.10.0", - org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0" + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0", + org.eclipse.core.databinding;bundle-version="1.4.1" Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests, org.eclipse.papyrus.infra.gmfdiag.css.tests.tests Bundle-Vendor: Eclipse Modeling Project -- cgit v1.2.3 From 5be40091c4ef545220ba241797265ffd9b1cc76e Mon Sep 17 00:00:00 2001 From: rschnekenbu Date: Sun, 16 Feb 2014 16:43:42 -0500 Subject: Bug 399858 - [Documentation] Papyrus shall have an embedded documentation https://bugs.eclipse.org/bugs/show_bug.cgi?id=399858 - Migration to Luna--- .../org.eclipse.papyrus.infra.feature/feature.xml | 113 +- .../build.properties | 3 +- .../icons/configuration.gif | Bin 0 -> 341 bytes .../icons/error.gif | Bin 0 -> 353 bytes .../plugin.xml | 69 +- .../dialog/AspectActionsInformationComposite.java | 125 +- .../palette/dialog/ExtendedPaletteContentPage.java | 5 +- .../palette/dialog/LocalPaletteContentPage.java | 5 +- .../dialog/LocalPaletteInformationPage.java | 2 +- .../handler/DeployPaletteConfigurationHandler.java | 308 ++++ .../UndeployPaletteConfigurationHandler.java | 112 ++ .../.classpath | 7 + .../.project | 28 + .../META-INF/MANIFEST.MF | 24 + .../about.html | 28 + .../build.properties | 7 + .../plugin.properties | 3 + .../plugin.xml | 14 + .../extendedtypes/elementtypeview/Activator.java | 57 + .../view/ElementTypeLabelProvider.java | 74 + .../elementtypeview/view/ElementTypeView.java | 245 +++ .../.classpath | 8 + .../.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 11 + .../META-INF/MANIFEST.MF | 26 + .../about.html | 28 + .../build.properties | 22 + ...ueryConfiguration_ModiscoQueryConfiguration.gif | Bin 0 -> 223 bytes ...ation_AspectSemanticTypeAdviceConfiguration.gif | Bin 0 -> 223 bytes ...iguration_AspectViewTypeAdviceConfiguration.gif | Bin 0 -> 223 bytes ...ateConfigurationElement_iconEntry_IconEntry.gif | Bin 0 -> 223 bytes ...elementType_AspectSemanticTypeConfiguration.gif | Bin 0 -> 223 bytes ...Set_elementType_AspectViewTypeConfiguration.gif | Bin 0 -> 223 bytes ...mentType_InvariantSemanticTypeConfiguration.gif | Bin 0 -> 223 bytes ...nfiguration_permissions_HierarchyPermission.gif | Bin 0 -> 223 bytes ...nfiguration_permissions_HierarchyPermission.gif | Bin 0 -> 223 bytes ...nfiguration_InvariantHierarchyConfiguration.gif | Bin 0 -> 223 bytes ...guration_invariantRuleConfiguration_AndRule.gif | Bin 0 -> 223 bytes ...iguration_invariantRuleConfiguration_OrRule.gif | Bin 0 -> 223 bytes .../icons/full/obj16/AndRule.gif | Bin 0 -> 129 bytes .../AspectSemanticTypeAdviceConfiguration.gif | Bin 0 -> 129 bytes .../full/obj16/AspectSemanticTypeConfiguration.gif | Bin 0 -> 129 bytes .../obj16/AspectViewTypeAdviceConfiguration.gif | Bin 0 -> 129 bytes .../full/obj16/AspectViewTypeConfiguration.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ElementTypeConfiguration.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ExtendedElementTypeSet.gif | Bin 0 -> 129 bytes .../icons/full/obj16/HierarchyPermission.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IconEntry.gif | Bin 0 -> 129 bytes .../icons/full/obj16/InvariantConfiguration.gif | Bin 0 -> 129 bytes .../full/obj16/InvariantContainerConfiguration.gif | Bin 0 -> 129 bytes .../full/obj16/InvariantHierarchyConfiguration.gif | Bin 0 -> 129 bytes .../obj16/InvariantSemanticTypeConfiguration.gif | Bin 0 -> 129 bytes .../icons/full/obj16/OrRule.gif | Bin 0 -> 129 bytes .../plugin.properties | 88 + .../plugin.xml | 66 + .../provider/HierarchyPermissionItemProvider.java | 216 +++ .../InvariantContainerConfigurationEditPlugin.java | 108 ++ ...nvariantContainerConfigurationItemProvider.java | 179 ++ ...nerConfigurationItemProviderAdapterFactory.java | 233 +++ .../provider/AndRuleItemProvider.java | 116 ++ .../ComposedRuleConfigurationItemProvider.java | 131 ++ .../InvariantRuleConfigurationItemProvider.java | 119 ++ ...variantSemanticTypeConfigurationEditPlugin.java | 105 ++ ...riantSemanticTypeConfigurationItemProvider.java | 187 ++ ...ypeConfigurationItemProviderAdapterFactory.java | 361 ++++ .../provider/OrRuleItemProvider.java | 116 ++ .../provider/ActionConfigurationItemProvider.java | 105 ++ ...spectSemanticTypeConfigurationItemProvider.java | 157 ++ .../AspectViewTypeConfigurationItemProvider.java | 157 ++ .../provider/ConfigurationElementItemProvider.java | 211 +++ ...ElementTypeAdviceConfigurationItemProvider.java | 105 ++ .../ElementTypeConfigurationItemProvider.java | 206 +++ .../ExtendedElementTypeSetItemProvider.java | 179 ++ .../provider/ExtendedTypesEditPlugin.java | 107 ++ .../ExtendedtypesItemProviderAdapterFactory.java | 301 ++++ .../provider/IconEntryItemProvider.java | 170 ++ .../provider/MatcherConfigurationItemProvider.java | 116 ++ .../SemanticActionConfigurationItemProvider.java | 105 ++ .../SemanticTypeConfigurationItemProvider.java | 105 ++ .../ViewActionConfigurationItemProvider.java | 105 ++ .../ViewTypeConfigurationItemProvider.java | 128 ++ ...riantSemanticTypeConfigurationItemProvider.java | 113 ++ ...ypeConfigurationItemProviderAdapterFactory.java | 26 + ...spectSemanticTypeConfigurationItemProvider.java | 115 ++ .../CustomExtendedElementTypeSetItemProvider.java | 57 + ...tomExtendedtypesItemProviderAdapterFactory.java | 53 + .../.classpath | 8 + .../.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 23 + .../build.properties | 20 + .../icons/full/obj16/AspectSemanticModelFile.gif | Bin 0 -> 346 bytes .../icons/full/obj16/ExtendedtypesModelFile.gif | Bin 0 -> 346 bytes .../InvariantHierarchyConfigurationModelFile.gif | Bin 0 -> 346 bytes ...InvariantSemanticTypeConfigurationModelFile.gif | Bin 0 -> 346 bytes .../icons/full/wizban/NewAspectSemantic.gif | Bin 0 -> 2462 bytes .../icons/full/wizban/NewExtendedtypes.gif | Bin 0 -> 2462 bytes .../wizban/NewInvariantHierarchyConfiguration.gif | Bin 0 -> 2462 bytes .../NewInvariantSemanticTypeConfiguration.gif | Bin 0 -> 2462 bytes .../plugin.properties | 90 + .../plugin.xml | 60 + .../presentation/ExtendedTypesEditorPlugin.java | 109 ++ .../ExtendedtypesActionBarContributor.java | 542 ++++++ .../presentation/ExtendedtypesEditor.java | 1804 ++++++++++++++++++++ .../presentation/ExtendedtypesModelWizard.java | 636 +++++++ .../presentation/CustomExtendedtypesEditor.java | 99 ++ .../.classpath | 2 +- .../.settings/org.eclipse.core.resources.prefs | 4 - .../META-INF/MANIFEST.MF | 32 +- .../build.properties | 11 +- .../CreateConstantValue_valueInstance_Duration.gif | Bin 0 -> 223 bytes ...onstantValue_valueInstance_DurationInterval.gif | Bin 0 -> 223 bytes ...reateConstantValue_valueInstance_Expression.gif | Bin 0 -> 223 bytes ...teConstantValue_valueInstance_InstanceValue.gif | Bin 0 -> 223 bytes .../CreateConstantValue_valueInstance_Interval.gif | Bin 0 -> 223 bytes ...eConstantValue_valueInstance_LiteralBoolean.gif | Bin 0 -> 223 bytes ...eConstantValue_valueInstance_LiteralInteger.gif | Bin 0 -> 223 bytes ...eateConstantValue_valueInstance_LiteralNull.gif | Bin 0 -> 223 bytes ...eateConstantValue_valueInstance_LiteralReal.gif | Bin 0 -> 223 bytes ...teConstantValue_valueInstance_LiteralString.gif | Bin 0 -> 223 bytes ...Value_valueInstance_LiteralUnlimitedNatural.gif | Bin 0 -> 223 bytes ...onstantValue_valueInstance_OpaqueExpression.gif | Bin 0 -> 223 bytes ...onstantValue_valueInstance_StringExpression.gif | Bin 0 -> 223 bytes ...eConstantValue_valueInstance_TimeExpression.gif | Bin 0 -> 223 bytes ...ateConstantValue_valueInstance_TimeInterval.gif | Bin 0 -> 223 bytes .../CreateFeatureToSet_value_ConstantValue.gif | Bin 0 -> 223 bytes .../ctool16/CreateFeatureToSet_value_ListValue.gif | Bin 0 -> 223 bytes ...reateFeatureToSet_value_QueryExecutionValue.gif | Bin 0 -> 223 bytes ...ionConfiguration_featuresToSet_FeatureToSet.gif | Bin 0 -> 223 bytes .../icons/full/obj16/ConstantValue.gif | Bin 0 -> 129 bytes .../icons/full/obj16/DynamicValue.gif | Bin 0 -> 129 bytes .../icons/full/obj16/FeatureToSet.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ListValue.gif | Bin 0 -> 129 bytes .../icons/full/obj16/QueryExecutionValue.gif | Bin 0 -> 129 bytes .../full/obj16/SetValuesActionConfiguration.gif | Bin 0 -> 129 bytes .../ModifySemanticValuesActionConfiguration.ecore | 31 - ...difySemanticValuesActionConfiguration.ecorediag | 286 ---- ...odifySemanticValuesActionConfiguration.genmodel | 32 - .../RuntimeValuesEditionActionConfiguration.ecore | 13 + ...ntimeValuesEditionActionConfiguration.ecorediag | 107 ++ ...untimeValuesEditionActionConfiguration.genmodel | 19 + .../model/SetValuesActionConfiguration.ecore | 26 + .../model/SetValuesActionConfiguration.ecorediag | 253 +++ .../model/SetValuesActionConfiguration.genmodel | 29 + .../plugin.properties | 24 + .../plugin.xml | 64 +- .../ConstantValue.java | 54 - .../DynamicValue.java | 21 - .../FeatureToSet.java | 81 - .../FeatureValue.java | 22 - .../ListValue.java | 44 - .../ModifySemanticValuesActionConfiguration.java | 46 - ...fySemanticValuesActionConfigurationFactory.java | 91 - ...fySemanticValuesActionConfigurationPackage.java | 548 ------ .../QueryExecutionValue.java | 54 - .../impl/ConstantValueImpl.java | 180 -- .../impl/DynamicValueImpl.java | 43 - .../impl/FeatureToSetImpl.java | 248 --- .../impl/FeatureValueImpl.java | 45 - .../impl/ListValueImpl.java | 136 -- ...manticValuesActionConfigurationFactoryImpl.java | 154 -- ...odifySemanticValuesActionConfigurationImpl.java | 156 -- ...manticValuesActionConfigurationPackageImpl.java | 384 ----- .../impl/QueryExecutionValueImpl.java | 161 -- ...ticValuesActionConfigurationAdapterFactory.java | 271 --- ...luesActionConfigurationResourceFactoryImpl.java | 56 - ...anticValuesActionConfigurationResourceImpl.java | 32 - ...ifySemanticValuesActionConfigurationSwitch.java | 279 --- ...anticValuesActionConfigurationXMLProcessor.java | 54 - .../RuntimeValuesEditionActionConfiguration.java | 42 + ...imeValuesEditionActionConfigurationFactory.java | 51 + ...imeValuesEditionActionConfigurationPackage.java | 265 +++ .../ViewToDisplay.java | 52 + ...aluesEditionActionConfigurationFactoryImpl.java | 106 ++ ...untimeValuesEditionActionConfigurationImpl.java | 152 ++ ...aluesEditionActionConfigurationPackageImpl.java | 228 +++ .../impl/ViewToDisplayImpl.java | 158 ++ ...esEditionActionConfigurationAdapterFactory.java | 196 +++ ...tionActionConfigurationResourceFactoryImpl.java | 41 + ...luesEditionActionConfigurationResourceImpl.java | 28 + ...timeValuesEditionActionConfigurationSwitch.java | 183 ++ ...luesEditionActionConfigurationXMLProcessor.java | 50 + .../ConstantValue.java | 50 + .../setvaluesactionconfiguration/DynamicValue.java | 17 + .../setvaluesactionconfiguration/FeatureToSet.java | 77 + .../setvaluesactionconfiguration/FeatureValue.java | 18 + .../setvaluesactionconfiguration/ListValue.java | 40 + .../QueryExecutionValue.java | 17 + .../SetValuesActionConfiguration.java | 42 + .../SetValuesActionConfigurationFactory.java | 78 + .../SetValuesActionConfigurationPackage.java | 534 ++++++ .../impl/ConstantValueImpl.java | 176 ++ .../impl/DynamicValueImpl.java | 39 + .../impl/FeatureToSetImpl.java | 244 +++ .../impl/FeatureValueImpl.java | 41 + .../impl/ListValueImpl.java | 150 ++ .../impl/QueryExecutionValueImpl.java | 39 + .../SetValuesActionConfigurationFactoryImpl.java | 139 ++ .../impl/SetValuesActionConfigurationImpl.java | 152 ++ .../SetValuesActionConfigurationPackageImpl.java | 367 ++++ ...SetValuesActionConfigurationAdapterFactory.java | 286 ++++ ...luesActionConfigurationResourceFactoryImpl.java | 52 + .../SetValuesActionConfigurationResourceImpl.java | 28 + .../util/SetValuesActionConfigurationSwitch.java | 293 ++++ .../SetValuesActionConfigurationXMLProcessor.java | 50 + .../emf/converter/ConverterNotfoundException.java | 70 + .../emf/converter/ConverterRegistry.java | 153 ++ .../emf/converter/ObjectToBooleanConverter.java | 49 + .../emf/converter/ObjectToIntegerConverter.java | 48 + .../ValueSpecificationToBooleanConverter.java | 37 + .../ValueSpecificationToEENumConverter.java | 71 + .../ValueSpecificationToEnumerationConverter.java | 50 + .../ValueSpecificationToIntegerConverter.java | 36 + .../ValueSpecificationToStringConverter.java | 37 + .../ModifySemanticValuesActionProvider.java | 186 -- ...uesEditionActionConfigurationModelCreation.java | 29 + ...aluesEditionActionCreationElementValidator.java | 36 + ...RuntimeValuesEditionActionEditHelperAdvice.java | 138 ++ .../FeatureValueUtils.java | 132 ++ .../SetValuesActionConfigurationModelCreation.java | 29 + .../SetValuesActionCreationElementValidator.java | 36 + .../SetValuesActionEditHelperAdvice.java | 177 ++ .../.classpath | 16 +- .../META-INF/MANIFEST.MF | 16 +- .../build.properties | 24 +- .../icons/configuration.gif | Bin 0 -> 341 bytes .../icons/error.gif | Bin 0 -> 353 bytes .../model/ExtendedTypes.ecore | 66 +- .../model/ExtendedTypes.ecorediag | 432 +++-- .../model/ExtendedTypes.genmodel | 89 +- .../model/InvariantContainerConfiguration.ecore | 14 + .../InvariantContainerConfiguration.ecorediag | 108 ++ .../model/InvariantContainerConfiguration.genmodel | 22 + .../model/InvariantSemanticTypeConfiguration.ecore | 18 + .../InvariantSemanticTypeConfiguration.ecorediag | 178 ++ .../InvariantSemanticTypeConfiguration.genmodel | 25 + .../plugin.xml | 267 ++- .../schema/aspectActionConfiguration.exsd | 156 ++ .../schema/elementMatcherConfiguration.exsd | 129 ++ .../schema/extendedElementTypeSet.exsd | 130 ++ .../schema/extendedTypeConfiguration.exsd | 141 ++ .../schema/extendedTypesSetConfiguration.exsd | 130 -- .../schema/invariantRule.exsd | 142 ++ .../schema/semanticTypeFactory.exsd | 152 ++ .../infra/extendedtypes/ActionConfiguration.java | 81 +- .../AspectSemanticTypeConfiguration.java | 51 + .../extendedtypes/AspectViewTypeConfiguration.java | 51 + .../infra/extendedtypes/AspectViewTypeFactory.java | 110 ++ .../infra/extendedtypes/ConfigurationElement.java | 150 ++ .../ElementTypeAdviceConfiguration.java | 26 + .../extendedtypes/ElementTypeConfiguration.java | 140 ++ .../ExtendedElementTypeConfiguration.java | 261 --- .../extendedtypes/ExtendedElementTypeSet.java | 61 +- .../infra/extendedtypes/ExtendedtypesFactory.java | 44 +- .../infra/extendedtypes/ExtendedtypesPackage.java | 1374 +++++++++++---- .../papyrus/infra/extendedtypes/IconEntry.java | 40 +- .../infra/extendedtypes/MatcherConfiguration.java | 28 + .../extendedtypes/PostActionConfiguration.java | 21 - .../extendedtypes/PreActionConfiguration.java | 21 - .../extendedtypes/SemanticActionConfiguration.java | 26 + .../extendedtypes/SemanticTypeConfiguration.java | 30 + .../extendedtypes/ViewActionConfiguration.java | 26 + .../infra/extendedtypes/ViewTypeConfiguration.java | 65 + .../impl/ActionConfigurationImpl.java | 199 +-- .../impl/AspectSemanticTypeConfigurationImpl.java | 169 ++ .../impl/AspectViewTypeConfigurationImpl.java | 169 ++ .../impl/ConfigurationElementImpl.java | 389 +++++ .../impl/ElementTypeAdviceConfigurationImpl.java | 51 + .../impl/ElementTypeConfigurationImpl.java | 375 ++++ .../impl/ExtendedElementTypeConfigurationImpl.java | 614 ------- .../impl/ExtendedElementTypeSetImpl.java | 146 +- .../impl/ExtendedtypesFactoryImpl.java | 81 +- .../impl/ExtendedtypesPackageImpl.java | 427 +++-- .../infra/extendedtypes/impl/IconEntryImpl.java | 102 +- .../impl/MatcherConfigurationImpl.java | 53 + .../impl/PostActionConfigurationImpl.java | 42 - .../impl/PreActionConfigurationImpl.java | 42 - .../impl/SemanticActionConfigurationImpl.java | 51 + .../impl/SemanticTypeConfigurationImpl.java | 51 + .../impl/ViewActionConfigurationImpl.java | 51 + .../impl/ViewTypeConfigurationImpl.java | 184 ++ .../HierarchyPermission.java | 114 ++ .../InvariantContainerConfiguration.java | 52 + .../InvariantContainerConfigurationFactory.java | 61 + .../InvariantContainerConfigurationPackage.java | 305 ++++ .../impl/HierarchyPermissionImpl.java | 281 +++ ...InvariantContainerConfigurationFactoryImpl.java | 116 ++ .../impl/InvariantContainerConfigurationImpl.java | 162 ++ ...InvariantContainerConfigurationPackageImpl.java | 253 +++ ...ariantContainerConfigurationAdapterFactory.java | 168 ++ ...tContainerConfigurationResourceFactoryImpl.java | 51 + ...nvariantContainerConfigurationResourceImpl.java | 38 + .../InvariantContainerConfigurationSwitch.java | 159 ++ ...nvariantContainerConfigurationXMLProcessor.java | 60 + .../AndRule.java | 27 + .../ComposedRuleConfiguration.java | 50 + .../InvariantRuleConfiguration.java | 28 + .../InvariantSemanticTypeConfiguration.java | 60 + .../InvariantSemanticTypeConfigurationFactory.java | 70 + .../InvariantSemanticTypeConfigurationPackage.java | 473 +++++ .../invariantsemantictypeconfiguration/OrRule.java | 27 + .../impl/AndRuleImpl.java | 49 + .../impl/ComposedRuleConfigurationImpl.java | 142 ++ .../impl/InvariantRuleConfigurationImpl.java | 51 + ...ariantSemanticTypeConfigurationFactoryImpl.java | 127 ++ .../InvariantSemanticTypeConfigurationImpl.java | 187 ++ ...ariantSemanticTypeConfigurationPackageImpl.java | 294 ++++ .../impl/OrRuleImpl.java | 49 + ...antSemanticTypeConfigurationAdapterFactory.java | 260 +++ ...manticTypeConfigurationResourceFactoryImpl.java | 51 + ...riantSemanticTypeConfigurationResourceImpl.java | 38 + .../InvariantSemanticTypeConfigurationSwitch.java | 261 +++ ...riantSemanticTypeConfigurationXMLProcessor.java | 60 + .../util/ExtendedtypesAdapterFactory.java | 292 +++- .../util/ExtendedtypesResourceFactoryImpl.java | 33 +- .../util/ExtendedtypesResourceImpl.java | 22 +- .../extendedtypes/util/ExtendedtypesSwitch.java | 384 ++++- .../util/ExtendedtypesXMLProcessor.java | 25 +- .../AbstractConfigurableElementTypeFactory.java | 119 ++ .../papyrus/infra/extendedtypes/Activator.java | 117 +- .../AspectConfigurationFactoryRegistry.java | 386 +++++ .../extendedtypes/AspectSemanticTypeFactory.java | 106 ++ .../extendedtypes/ComposedContainerDescriptor.java | 95 ++ .../extendedtypes/ComposedEditHelperAdvice.java | 178 ++ .../ComposedElementCreationValidator.java | 56 + .../extendedtypes/ComposedElementMatcher.java | 50 + .../ConfigurableElementMatcherFactoryRegistry.java | 246 +++ .../infra/extendedtypes/ElementTypeSetUtils.java | 122 ++ .../extendedtypes/ExtendedEditHelperAdvice.java | 107 -- .../ExtendedElementTypeSetRegistry.java | 627 +++++++ .../ExtendedSemanticTypeDescriptor.java | 134 -- .../extendedtypes/ExtendedTypeRegistryService.java | 52 + .../infra/extendedtypes/ExtendedTypesRegistry.java | 276 --- .../IActionConfigurationModelCreation.java | 22 + .../extendedtypes/IActionContainerDescriptor.java | 28 + .../IActionCreationElementValidator.java | 26 + .../extendedtypes/IActionEditHelperAdvice.java | 24 + .../extendedtypes/IAspectTypeExtensionPoint.java | 42 + .../extendedtypes/IConfigurableElementMatcher.java | 28 + .../IConfigurableElementMatcherFactory.java | 29 + .../extendedtypes/ICreationElementValidator.java | 28 + .../extendedtypes/IEditHelperAdviceConstants.java | 22 + .../IElementMatcherConfigurationModelCreation.java | 22 + .../IElementMatcherExtensionPoint.java | 34 + .../extendedtypes/IExtendedElementTypeFactory.java | 38 + .../IExtendedElementTypeSetExtensionPoint.java | 40 + .../IExtendedTypeConfigurationExtensionPoint.java | 39 + .../extendedtypes/IExtendedTypeExtensionPoint.java | 40 - .../advices/ExtendedTypesOwnerAdvice.java | 372 ++-- .../DeployExtendedTypeSetConfigurationHandler.java | 148 ++ ...ndeployExtendedTypeSetConfigurationHandler.java | 149 ++ ...tContainerConfigurationContainerDescriptor.java | 120 ++ ...variantContainerConfigurationModelCreation.java | 29 + .../InvariantContainerEditHelperAdvice.java | 141 ++ .../InvariantContainerMatcher.java | 148 ++ .../AndRuleCreationElementValidator.java | 52 + .../AndRuleEditHelperAdvice.java | 56 + .../AndRuleElementMatcher.java | 65 + .../IInvariantConfigurationModelCreation.java | 22 + .../IInvariantContainerDescriptor.java | 27 + .../IInvariantCreationElementValidator.java | 24 + .../IInvariantEditHelperAdvice.java | 28 + .../IInvariantElementMatcher.java | 28 + .../IInvariantRuleExtensionPoint.java | 38 + .../InvariantElementTypeFactory.java | 80 + .../InvariantSemanticTypeContainerDescriptor.java | 47 + .../InvariantSemanticTypeEditHelperAdvice.java | 30 + .../OrRuleCreationElementValidator.java | 52 + .../OrRuleEditHelperAdvice.java | 61 + .../OrRuleElementMatcher.java | 65 + .../RuleConfigurationFactoryRegistry.java | 456 +++++ .../preferences/ExtendedTypesPreferences.java | 116 +- .../providers/ProviderNotFoundException.java | 72 +- .../semantic/ISemanticTypeFactory.java | 23 + .../types/ExtendedHintedElementType.java | 71 + .../types/ExtendedHintedTypeFactory.java | 125 -- .../types/IExtendedHintedElementType.java | 56 +- .../infra/extendedtypes/util/ElementTypeUtils.java | 371 ++-- .../META-INF/MANIFEST.MF | 58 +- .../infra/newchild/CreationMenuFactory.java | 646 +++---- .../META-INF/MANIFEST.MF | 3 +- .../model/SysML.ReusableParts.idgen | 278 +-- .../model/UML.ReusableParts.idgen | 174 +- .../policy/BlockCompositeSemanticEditPolicy.java | 18 +- .../BlockPropertyCompositeSemanticEditPolicy.java | 40 +- ...ertyStructureCompartmentSemanticEditPolicy.java | 49 +- ...aintParameterCompartmentSemanticEditPolicy.java | 18 +- .../FlowPortCompartmentSemanticEditPolicy.java | 17 +- ...edBlockPropertyCompositeSemanticEditPolicy.java | 40 +- .../policy/PartCompartmentSemanticEditPolicy.java | 23 +- .../PropertyCompartmentSemanticEditPolicy.java | 38 +- .../ReferenceCompartmentSemanticEditPolicy.java | 17 +- .../StructureCompartmentSemanticEditPolicy.java | 33 +- .../policy/ValueCompartmentSemanticEditPolicy.java | 17 +- .../icons/obj16/Thumbs.db | Bin 0 -> 270336 bytes .../plugin.xml | 47 +- .../common/part/PapyrusPalettePreferences.java | 296 +++- .../common/service/IPapyrusPaletteConstant.java | 3 + .../common/service/LocalPaletteProvider.java | 10 +- .../common/service/PapyrusPaletteService.java | 57 +- .../common/service/PluginPaletteProvider.java | 6 +- .../common/service/WorkspacePaletteProvider.java | 54 + .../policies/UMLBaseItemSemanticEditPolicy.java | 420 +++-- .../composite/providers/UMLViewProvider.java | 26 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 25 +- .../plugin.xml | 3 +- .../provider/ChildConfigurationItemProvider.java | 101 -- .../edit/provider/ConfigurationItemProvider.java | 235 --- .../provider/DrawerConfigurationItemProvider.java | 167 -- .../provider/ElementDescriptorItemProvider.java | 182 -- .../edit/provider/IconDescriptorItemProvider.java | 182 -- .../provider/LeafConfigurationItemProvider.java | 101 -- .../provider/PaletteConfigurationEditPlugin.java | 100 -- .../provider/PaletteConfigurationItemProvider.java | 157 -- ...tteconfigurationItemProviderAdapterFactory.java | 345 ---- .../SeparatorConfigurationItemProvider.java | 112 -- .../provider/StackConfigurationItemProvider.java | 162 -- .../provider/ToolConfigurationItemProvider.java | 208 --- .../provider/ChildConfigurationItemProvider.java | 100 ++ .../provider/ConfigurationItemProvider.java | 236 +++ .../provider/DrawerConfigurationItemProvider.java | 167 ++ .../provider/ElementDescriptorItemProvider.java | 182 ++ .../provider/IconDescriptorItemProvider.java | 182 ++ .../provider/LeafConfigurationItemProvider.java | 100 ++ .../provider/PaletteConfigurationEditPlugin.java | 92 + .../provider/PaletteConfigurationItemProvider.java | 157 ++ ...tteconfigurationItemProviderAdapterFactory.java | 343 ++++ .../SeparatorConfigurationItemProvider.java | 111 ++ .../provider/StackConfigurationItemProvider.java | 162 ++ .../provider/ToolConfigurationItemProvider.java | 185 ++ .../model/PaletteConfiguration.ecore | 8 +- .../model/PaletteConfiguration.ecorediag | 37 - .../model/PaletteConfiguration.genmodel | 6 +- .../plugin.xml | 1 - .../provider/ExtendedConnectionToolEntry.java | 4 +- .../provider/ExtendedCreationToolEntry.java | 5 +- .../provider/ExtendedPluginPaletteProvider.java | 12 +- .../META-INF/MANIFEST.MF | 30 +- .../model/ApplyStereotypeActionConfiguration.ecore | 27 +- .../ApplyStereotypeActionConfiguration.ecorediag | 250 ++- .../ApplyStereotypeActionConfiguration.genmodel | 57 +- .../model/InvariantStereotypeConfiguration.ecore | 10 + .../InvariantStereotypeConfiguration.ecorediag | 55 + .../InvariantStereotypeConfiguration.genmodel | 19 + .../model/SetTypeActionConfiguration.ecore | 11 + .../model/SetTypeActionConfiguration.ecorediag | 54 + .../model/SetTypeActionConfiguration.genmodel | 19 + .../StereotypedElementMatcherConfiguration.ecore | 10 + ...tereotypedElementMatcherConfiguration.ecorediag | 51 + ...StereotypedElementMatcherConfiguration.genmodel | 18 + .../plugin.xml | 132 +- .../papyrus/uml/tools/extendedtypes/Activator.java | 90 - .../ApplyStereotypeActionConfiguration.java | 19 +- .../ApplyStereotypeActionConfigurationFactory.java | 50 +- .../ApplyStereotypeActionConfigurationPackage.java | 423 ++++- .../ConstantValue.java | 60 + .../DynamicValue.java | 27 + .../FeatureToSet.java | 87 + .../FeatureValue.java | 28 + .../ListValue.java | 50 + .../QueryExecutionValue.java | 27 + .../StereotypeToApply.java | 36 +- ...lyStereotypeActionConfigurationFactoryImpl.java | 68 +- .../ApplyStereotypeActionConfigurationImpl.java | 23 +- ...lyStereotypeActionConfigurationPackageImpl.java | 215 ++- .../impl/ConstantValueImpl.java | 186 ++ .../impl/DynamicValueImpl.java | 49 + .../impl/FeatureToSetImpl.java | 254 +++ .../impl/FeatureValueImpl.java | 51 + .../impl/ListValueImpl.java | 160 ++ .../impl/QueryExecutionValueImpl.java | 49 + .../impl/StereotypeToApplyImpl.java | 72 +- ...tereotypeActionConfigurationAdapterFactory.java | 161 +- ...typeActionConfigurationResourceFactoryImpl.java | 17 +- ...yStereotypeActionConfigurationResourceImpl.java | 15 +- .../ApplyStereotypeActionConfigurationSwitch.java | 179 +- ...yStereotypeActionConfigurationXMLProcessor.java | 17 +- .../InvariantStereotypeConfiguration.java | 87 + .../InvariantStereotypeConfigurationFactory.java | 52 + .../InvariantStereotypeConfigurationPackage.java | 198 +++ ...nvariantStereotypeConfigurationFactoryImpl.java | 104 ++ .../impl/InvariantStereotypeConfigurationImpl.java | 224 +++ ...nvariantStereotypeConfigurationPackageImpl.java | 193 +++ ...riantStereotypeConfigurationAdapterFactory.java | 148 ++ ...StereotypeConfigurationResourceFactoryImpl.java | 49 + ...variantStereotypeConfigurationResourceImpl.java | 37 + .../InvariantStereotypeConfigurationSwitch.java | 140 ++ ...variantStereotypeConfigurationXMLProcessor.java | 56 + .../SetTypeActionConfiguration.java | 69 + .../SetTypeActionConfigurationFactory.java | 52 + .../SetTypeActionConfigurationPackage.java | 226 +++ .../SetTypeActionConfigurationFactoryImpl.java | 105 ++ .../impl/SetTypeActionConfigurationImpl.java | 195 +++ .../SetTypeActionConfigurationPackageImpl.java | 209 +++ .../SetTypeActionConfigurationAdapterFactory.java | 188 ++ .../util/SetTypeActionConfigurationSwitch.java | 172 ++ .../StereotypedElementMatcherConfiguration.java | 60 + ...reotypedElementMatcherConfigurationFactory.java | 52 + ...reotypedElementMatcherConfigurationPackage.java | 161 ++ ...ypedElementMatcherConfigurationFactoryImpl.java | 104 ++ ...StereotypedElementMatcherConfigurationImpl.java | 170 ++ ...ypedElementMatcherConfigurationPackageImpl.java | 195 +++ ...dElementMatcherConfigurationAdapterFactory.java | 147 ++ ...entMatcherConfigurationResourceFactoryImpl.java | 49 + ...pedElementMatcherConfigurationResourceImpl.java | 37 + ...ereotypedElementMatcherConfigurationSwitch.java | 136 ++ ...pedElementMatcherConfigurationXMLProcessor.java | 57 + .../papyrus/uml/tools/extendedtypes/Activator.java | 90 + ...StereotypeActionConfigurationModelCreation.java | 29 + ...lyStereotypeActionCreationElementValidator.java | 74 + .../ApplyStereotypeActionEditHelperAdvice.java | 261 +++ .../StereotypeFeatureValueUtils.java | 126 ++ ...ariantStereotypeConfigurationModelCreation.java | 29 + ...nvariantStereotypeCreationElementValidator.java | 67 + .../InvariantStereotypeEditHelperAdvice.java | 62 + .../InvariantStereotypeElementMatcher.java | 61 + .../providers/ApplyStereotypeActionProvider.java | 252 --- .../SetTypeActionConfigurationModelCreation.java | 29 + .../SetTypeActionCreationElementValidator.java | 38 + .../SetTypeActionEditHelperAdvice.java | 121 ++ .../StereotypedElementMatcher.java | 60 + .../StereotypedElementMatcherFactory.java | 29 + .../StereotypedElementMatcherModelCreation.java | 29 + .../.project | 56 +- .../META-INF/MANIFEST.MF | 30 +- .../build.properties | 18 +- .../fragment.properties | 12 - .../fragment.xml | 15 - .../icons/M.gif | Bin 0 -> 912 bytes .../icons/O.gif | Bin 0 -> 912 bytes .../icons/Values.gif | Bin 0 -> 361 bytes .../model/ExtendedTypesTestsProfile.ctx | 38 + .../model/ExtendedTypesTestsProfile.profile.di | 17 + .../ExtendedTypesTestsProfile.profile.notation | 120 ++ .../model/ExtendedTypesTestsProfile.profile.uml | 370 ++++ .../model/MyPalette.palette | 1 + .../model/Test.extendedtypes | 122 ++ .../model/TestMenu.xmi | 33 + .../model/model.di | 10 +- .../model/model.notation | 128 +- .../model/model.uml | 122 +- .../model/ui/SingleStereotypeWithFeaturesToSet.xwt | 2 + .../org.eclipse.papyrus.extendedtypes.tests.launch | 40 - ...clipse.papyrus.infra.extendedtypes.tests.launch | 41 + .../plugin.properties | 12 + .../plugin.xml | 38 + .../papyrus/infra/extendedtypes/AllTests.java | 27 - .../ExtendedEditHelperAdviceTests.java | 218 --- .../extendedtypes/ExtendedTypesRegistryTests.java | 128 -- .../infra/extendedtypes/ITestConstants.java | 53 - .../preferences/ExtendedTypesPreferencesTests.java | 104 -- .../infra/extendedtypes/tests/Activator.java | 50 + .../infra/extendedtypes/tests/AllTests.java | 26 + .../tests/ExtendedEditHelperAdviceTests.java | 200 +++ .../tests/ExtendedTypesRegistryTests.java | 225 +++ .../infra/extendedtypes/tests/ITestConstants.java | 25 + 557 files changed, 43771 insertions(+), 11709 deletions(-) create mode 100644 plugins/customization/org.eclipse.papyrus.customization.palette/icons/configuration.gif create mode 100644 plugins/customization/org.eclipse.papyrus.customization.palette/icons/error.gif create mode 100644 plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/DeployPaletteConfigurationHandler.java create mode 100644 plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/UndeployPaletteConfigurationHandler.java create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.classpath create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.project create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/META-INF/MANIFEST.MF create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/about.html create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/build.properties create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.properties create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.xml create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/Activator.java create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeLabelProvider.java create mode 100644 plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeView.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.classpath create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.project create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/META-INF/MANIFEST.MF create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/about.html create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/build.properties create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateActionConfiguration_preValidationQueryConfiguration_ModiscoQueryConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectSemanticTypeConfiguration_adviceConfiguration_AspectSemanticTypeAdviceConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectViewTypeConfiguration_adviceConfiguration_AspectViewTypeAdviceConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateConfigurationElement_iconEntry_IconEntry.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectSemanticTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectViewTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_InvariantSemanticTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantContainerConfiguration_permissions_HierarchyPermission.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantHierarchyConfiguration_permissions_HierarchyPermission.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantConfiguration_InvariantHierarchyConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_AndRule.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_OrRule.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AndRule.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeAdviceConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeAdviceConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ElementTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ExtendedElementTypeSet.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/HierarchyPermission.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/IconEntry.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantContainerConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantHierarchyConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantSemanticTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/OrRule.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.properties create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.xml create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/HierarchyPermissionItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationEditPlugin.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProviderAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/AndRuleItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/ComposedRuleConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantRuleConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationEditPlugin.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProviderAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/OrRuleItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ActionConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectSemanticTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectViewTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ConfigurationElementItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeAdviceConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedElementTypeSetItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedTypesEditPlugin.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedtypesItemProviderAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/IconEntryItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/MatcherConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticActionConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewActionConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomAspectSemanticTypeConfigurationItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedElementTypeSetItemProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedtypesItemProviderAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.classpath create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.project create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/build.properties create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/AspectSemanticModelFile.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/ExtendedtypesModelFile.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantHierarchyConfigurationModelFile.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantSemanticTypeConfigurationModelFile.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewAspectSemantic.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewExtendedtypes.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantHierarchyConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantSemanticTypeConfiguration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.properties create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.xml create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedTypesEditorPlugin.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesActionBarContributor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesEditor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesModelWizard.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Duration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_DurationInterval.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Expression.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_InstanceValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Interval.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralBoolean.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralInteger.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralNull.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralReal.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralString.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralUnlimitedNatural.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_OpaqueExpression.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_StringExpression.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeExpression.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeInterval.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ConstantValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ListValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_QueryExecutionValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateSetValuesActionConfiguration_featuresToSet_FeatureToSet.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ConstantValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/DynamicValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/FeatureToSet.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ListValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/QueryExecutionValue.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/SetValuesActionConfiguration.gif delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecore delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecorediag delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.genmodel create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ConstantValue.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/DynamicValue.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureToSet.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureValue.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ListValue.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfiguration.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationFactory.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationPackage.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/QueryExecutionValue.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ConstantValueImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/DynamicValueImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureToSetImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureValueImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ListValueImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationFactoryImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationPackageImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/QueryExecutionValueImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationAdapterFactory.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceFactoryImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationSwitch.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationXMLProcessor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ConstantValue.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/DynamicValue.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValue.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ListValue.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/QueryExecutionValue.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ConstantValueImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/DynamicValueImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureValueImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ListValueImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/QueryExecutionValueImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationModelCreation.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionCreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecore create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecorediag create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.genmodel create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecore create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecorediag create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.genmodel create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/aspectActionConfiguration.exsd create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/elementMatcherConfiguration.exsd create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedElementTypeSet.exsd create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypeConfiguration.exsd delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypesSetConfiguration.exsd create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/invariantRule.exsd create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/semanticTypeFactory.exsd create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ConfigurationElement.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeAdviceConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeConfiguration.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/MatcherConfiguration.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PostActionConfiguration.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PreActionConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticActionConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticTypeConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewActionConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewTypeConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectSemanticTypeConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectViewTypeConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ConfigurationElementImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeAdviceConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeConfigurationImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/MatcherConfigurationImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PostActionConfigurationImpl.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PreActionConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticActionConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticTypeConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewActionConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewTypeConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/HierarchyPermission.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationPackage.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/HierarchyPermissionImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationPackageImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationSwitch.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationXMLProcessor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRule.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/ComposedRuleConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantRuleConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfiguration.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationPackage.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRule.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/AndRuleImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/ComposedRuleConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantRuleConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationPackageImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/OrRuleImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationAdapterFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceFactoryImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceImpl.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationSwitch.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationXMLProcessor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AbstractConfigurableElementTypeFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectConfigurationFactoryRegistry.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedContainerDescriptor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementCreationValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementMatcher.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ConfigurableElementMatcherFactoryRegistry.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedSemanticTypeDescriptor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistry.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionConfigurationModelCreation.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionContainerDescriptor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionCreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IAspectTypeExtensionPoint.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcher.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcherFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ICreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherConfigurationModelCreation.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherExtensionPoint.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeSetExtensionPoint.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeConfigurationExtensionPoint.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeExtensionPoint.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationContainerDescriptor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationModelCreation.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerMatcher.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleCreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleElementMatcher.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantConfigurationModelCreation.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantContainerDescriptor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantCreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantElementMatcher.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantRuleExtensionPoint.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeContainerDescriptor.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleCreationElementValidator.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleEditHelperAdvice.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleElementMatcher.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/RuleConfigurationFactoryRegistry.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/semantic/ISemanticTypeFactory.java create mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedElementType.java delete mode 100644 plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Thumbs.db create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/WorkspacePaletteProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ChildConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java delete mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java create mode 100644 plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecorediag create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.genmodel create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecore create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecorediag create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.genmodel delete mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ConstantValue.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/DynamicValue.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureValue.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ListValue.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/QueryExecutionValue.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ConstantValueImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/DynamicValueImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureValueImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ListValueImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/QueryExecutionValueImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationFactoryImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationAdapterFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceFactoryImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationSwitch.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationXMLProcessor.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfiguration.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationPackage.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationFactoryImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationPackageImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationAdapterFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceFactoryImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceImpl.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationSwitch.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationXMLProcessor.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationModelCreation.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionCreationElementValidator.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeFeatureValueUtils.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationModelCreation.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeCreationElementValidator.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeEditHelperAdvice.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java delete mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/providers/ApplyStereotypeActionProvider.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcher.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherFactory.java create mode 100644 plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherModelCreation.java delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.properties delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.xml create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/M.gif create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/O.gif create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/Values.gif create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.di create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.notation create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.uml create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/MyPalette.palette create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.extendedtypes.tests.launch create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.infra.extendedtypes.tests.launch create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.properties create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.xml delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/AllTests.java delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdviceTests.java delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistryTests.java delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ITestConstants.java delete mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferencesTests.java create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/Activator.java create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AllTests.java create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedEditHelperAdviceTests.java create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedTypesRegistryTests.java create mode 100644 tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ITestConstants.java (limited to 'tests') diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml index 4ef94005770..ab71672010a 100644 --- a/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml +++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.feature/feature.xml @@ -1,16 +1,11 @@ - - + - Copyright (c) 2012 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 + Copyright (c) 2012 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 @@ -18,94 +13,32 @@ http://www.eclipse.org/legal/epl-v10.html %license - + - + + + + + - + - + - + - + - + - + - + - + - + - + - - - + \ No newline at end of file diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/build.properties b/plugins/customization/org.eclipse.papyrus.customization.palette/build.properties index c07b601eac7..447b2cd9ef8 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.palette/build.properties +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/build.properties @@ -4,7 +4,8 @@ bin.includes = META-INF/,\ .,\ about.html,\ plugin.xml,\ - plugin.properties + plugin.properties,\ + icons/ src.includes=about.html source..=src/ bin..=bin/ diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/icons/configuration.gif b/plugins/customization/org.eclipse.papyrus.customization.palette/icons/configuration.gif new file mode 100644 index 00000000000..0b1be97b8cf Binary files /dev/null and b/plugins/customization/org.eclipse.papyrus.customization.palette/icons/configuration.gif differ diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/icons/error.gif b/plugins/customization/org.eclipse.papyrus.customization.palette/icons/error.gif new file mode 100644 index 00000000000..9b048d60532 Binary files /dev/null and b/plugins/customization/org.eclipse.papyrus.customization.palette/icons/error.gif differ diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/plugin.xml b/plugins/customization/org.eclipse.papyrus.customization.palette/plugin.xml index 671d9c6c176..2857c76fa0b 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.palette/plugin.xml +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/plugin.xml @@ -7,5 +7,72 @@ customizerDialog="org.eclipse.papyrus.customization.palette.dialog.PapyrusPaletteCustomizerDialog"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/AspectActionsInformationComposite.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/AspectActionsInformationComposite.java index 1468bcfc491..d1d3ca29430 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/AspectActionsInformationComposite.java +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/AspectActionsInformationComposite.java @@ -15,17 +15,16 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ITreeSelection; -import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.uml.diagram.common.Activator; import org.eclipse.papyrus.uml.diagram.common.Messages; import org.eclipse.papyrus.uml.diagram.common.service.palette.AspectToolService; @@ -35,6 +34,8 @@ import org.eclipse.papyrus.uml.diagram.common.service.palette.IPaletteAspectTool import org.eclipse.papyrus.uml.diagram.common.service.palette.IPostAction; import org.eclipse.papyrus.uml.diagram.common.service.palette.IPreAction; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Image; @@ -103,15 +104,6 @@ public class AspectActionsInformationComposite { /** move down aspect action button */ protected Button moveDownActionButton; - /** the current services registry */ - protected ServicesRegistry registry; - - - public AspectActionsInformationComposite(ServicesRegistry registry) { - Assert.isNotNull(registry); - this.registry = registry; - } - /** * Creates the content for this composite * @@ -121,7 +113,6 @@ public class AspectActionsInformationComposite { */ public Composite createComposite(Composite parent, List appliedProfiles) { this.appliedProfiles = appliedProfiles; - Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(2, false); layout.marginWidth = 0; @@ -148,22 +139,29 @@ public class AspectActionsInformationComposite { addActionButton = new Button(actionList, SWT.NONE); addActionButton.setImage(Activator.getPluginIconImage(Activator.ID, ICONS_ADD)); - addActionButton.addSelectionListener(new SelectionListener() { + addActionButton.addMouseListener(new MouseListener() { - public void widgetSelected(SelectionEvent e) { + public void mouseUp(MouseEvent e) { addButtonPressed(); } - public void widgetDefaultSelected(SelectionEvent e) { - //Nothing + public void mouseDown(MouseEvent e) { + + } + + public void mouseDoubleClick(MouseEvent e) { + } }); removeActionButton = new Button(actionList, SWT.NONE); removeActionButton.setImage(Activator.getPluginIconImage(Activator.ID, ICONS_REMOVE)); - removeActionButton.addSelectionListener(new SelectionListener() { + removeActionButton.addMouseListener(new MouseListener() { - public void widgetSelected(SelectionEvent e) { + /** + * @{inheritDoc + */ + public void mouseUp(MouseEvent e) { // remove the selected aspect action(s) ITreeSelection selection = (ITreeSelection)viewer.getSelection(); if(selection != null && selection.size() > 0) { @@ -178,19 +176,29 @@ public class AspectActionsInformationComposite { setSelectedEntryProxy(selectedEntryProxy); } - public void widgetDefaultSelected(SelectionEvent e) { - //Nothing + /** + * @{inheritDoc + */ + public void mouseDown(MouseEvent e) { + + } + + /** + * @{inheritDoc + */ + public void mouseDoubleClick(MouseEvent e) { + } }); moveUpActionButton = new Button(actionList, SWT.NONE); moveUpActionButton.setImage(Activator.getPluginIconImage(Activator.ID, ICONS_UP)); - moveUpActionButton.addSelectionListener(new SelectionListener() { + moveUpActionButton.addMouseListener(new MouseListener() { /** * @{inheritDoc */ - public void widgetSelected(SelectionEvent e) { + public void mouseUp(MouseEvent e) { IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); if(selection != null && selection.size() > 0 && selectedEntryProxy instanceof IPaletteAspectToolEntryProxy) { IAspectAction action = (IAspectAction)selection.getFirstElement(); @@ -216,19 +224,29 @@ public class AspectActionsInformationComposite { } - public void widgetDefaultSelected(SelectionEvent e) { - //Nothing + /** + * @{inheritDoc + */ + public void mouseDown(MouseEvent e) { + + } + + /** + * @{inheritDoc + */ + public void mouseDoubleClick(MouseEvent e) { + } }); moveDownActionButton = new Button(actionList, SWT.NONE); moveDownActionButton.setImage(Activator.getPluginIconImage(Activator.ID, ICONS_DOWN)); - moveDownActionButton.addSelectionListener(new SelectionListener() { + moveDownActionButton.addMouseListener(new MouseListener() { /** * @{inheritDoc */ - public void widgetSelected(SelectionEvent e) { + public void mouseUp(MouseEvent e) { IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); if(selection != null && selection.size() > 0 && selectedEntryProxy instanceof IPaletteAspectToolEntryProxy) { IAspectAction action = (IAspectAction)selection.getFirstElement(); @@ -254,8 +272,18 @@ public class AspectActionsInformationComposite { } - public void widgetDefaultSelected(SelectionEvent e) { - //Nothing + /** + * @{inheritDoc + */ + public void mouseDown(MouseEvent e) { + + } + + /** + * @{inheritDoc + */ + public void mouseDoubleClick(MouseEvent e) { + } }); @@ -304,7 +332,6 @@ public class AspectActionsInformationComposite { public void widgetSelected(SelectionEvent e) { IAspectActionProvider factory = (IAspectActionProvider)((MenuItem)e.getSource()).getData(); IAspectAction action = factory.createAction(null); - action.setServicesRegistry(registry); if(selectedEntryProxy instanceof IPaletteAspectToolEntryProxy) { if(action instanceof IPostAction) { ((IPaletteAspectToolEntryProxy)selectedEntryProxy).getPostActions().add((IPostAction)action); @@ -319,7 +346,7 @@ public class AspectActionsInformationComposite { * @{inheritDoc */ public void widgetDefaultSelected(SelectionEvent e) { - //Nothing + } }); } @@ -450,14 +477,14 @@ public class AspectActionsInformationComposite { * @{inheritDoc */ public void dispose() { - //Nothing + } /** * @{inheritDoc */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - //Nothing + } } @@ -465,12 +492,11 @@ public class AspectActionsInformationComposite { /** * Label provider for the aspect actions viewer */ - protected class AspectActionLabelProvider extends LabelProvider { + protected class AspectActionLabelProvider implements ILabelProvider { /** * @{inheritDoc */ - @Override public Image getImage(Object element) { if(element instanceof IAspectAction) { return ((IAspectAction)element).getImage(); @@ -481,7 +507,6 @@ public class AspectActionsInformationComposite { /** * @{inheritDoc */ - @Override public String getText(Object element) { if(element instanceof IAspectAction) { return ((IAspectAction)element).getLabel(); @@ -489,6 +514,34 @@ public class AspectActionsInformationComposite { return "notAnAction"; } + /** + * @{inheritDoc + */ + public void addListener(ILabelProviderListener listener) { + + } + + /** + * @{inheritDoc + */ + public void dispose() { + + } + + /** + * @{inheritDoc + */ + public boolean isLabelProperty(Object element, String property) { + return false; + } + + /** + * @{inheritDoc + */ + public void removeListener(ILabelProviderListener listener) { + + } + } } diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/ExtendedPaletteContentPage.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/ExtendedPaletteContentPage.java index 33d4aceac81..6043daf451d 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/ExtendedPaletteContentPage.java +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/ExtendedPaletteContentPage.java @@ -64,7 +64,6 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.uml.diagram.common.Activator; import org.eclipse.papyrus.uml.diagram.common.Messages; import org.eclipse.papyrus.uml.diagram.common.part.PaletteUtil; @@ -225,7 +224,7 @@ public class ExtendedPaletteContentPage extends WizardPage implements Listener { protected ConfigurationInformationComposite informationComposite = new ConfigurationInformationComposite(); /** class in charge of the aspect tool information composite */ - protected AspectActionsInformationComposite aspectActionComposite; + protected AspectActionsInformationComposite aspectActionComposite = new AspectActionsInformationComposite(); /** toolbar above tools */ protected ToolBar toolbar; @@ -256,8 +255,6 @@ public class ExtendedPaletteContentPage extends WizardPage implements Listener { super(Messages.Local_Palette_ContentPage_Name, Messages.Local_Palette_ContentPage_Title, Activator.getImageDescriptor(WIZARD_ICON)); this.editorPart = part; this.customizer = customizer; - - aspectActionComposite = new AspectActionsInformationComposite((ServicesRegistry)editorPart.getAdapter(ServicesRegistry.class)); } diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java index 4b319620d35..8e02014cde3 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java @@ -72,7 +72,6 @@ import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.papyrus.customization.palette.proxies.XMLDefinitionPaletteProxyFactory; -import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.uml.diagram.common.Activator; import org.eclipse.papyrus.uml.diagram.common.Messages; import org.eclipse.papyrus.uml.diagram.common.part.PaletteUtil; @@ -229,7 +228,7 @@ public class LocalPaletteContentPage extends WizardPage implements Listener { protected PaletteEntryProxyInformationComposite informationComposite = new PaletteEntryProxyInformationComposite(); /** class in charge of the aspect tool information composite */ - protected AspectActionsInformationComposite aspectActionComposite; + protected AspectActionsInformationComposite aspectActionComposite = new AspectActionsInformationComposite(); protected ToolBar toolbar; @@ -250,8 +249,6 @@ public class LocalPaletteContentPage extends WizardPage implements Listener { super(Messages.Local_Palette_ContentPage_Name, Messages.Local_Palette_ContentPage_Title, Activator.getImageDescriptor(WIZARD_ICON)); this.editorPart = part; this.customizer = customizer; - - this.aspectActionComposite = new AspectActionsInformationComposite((ServicesRegistry)editorPart.getAdapter(ServicesRegistry.class)); } /** diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteInformationPage.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteInformationPage.java index 06435d62f41..03bae76048d 100644 --- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteInformationPage.java +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteInformationPage.java @@ -172,7 +172,7 @@ public class LocalPaletteInformationPage extends WizardPage implements Listener } initEditorID(editorIDValue); initPaletteID(descriptor.getContributionID()); - initPriority(PapyrusPalettePreferences.getPalettePriority(descriptor.getContributionID())); + initPriority(PapyrusPalettePreferences.getLocalPalettePriority(descriptor.getContributionID())); validateOnLaunch = true; } diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/DeployPaletteConfigurationHandler.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/DeployPaletteConfigurationHandler.java new file mode 100644 index 00000000000..7b5d16d25c9 --- /dev/null +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/DeployPaletteConfigurationHandler.java @@ -0,0 +1,308 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.customization.palette.handler; + +import java.util.Iterator; +import java.util.Set; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.gmf.runtime.common.core.service.ProviderPriority; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.TrayDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.uml.diagram.common.Activator; +import org.eclipse.papyrus.uml.diagram.common.part.PaletteUtil; +import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPalettePreferences; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CCombo; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.statushandlers.StatusManager; + + +/** + * Handler to deploy new configuration + */ +public class DeployPaletteConfigurationHandler extends AbstractHandler implements IHandler { + + /** + * {@inheritDoc} + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection currentSelection = HandlerUtil.getCurrentSelection(event); + if(!(currentSelection instanceof IStructuredSelection) || currentSelection.isEmpty()) { + return null; + } + + final IStructuredSelection selection = (IStructuredSelection)currentSelection; + + final Shell activeShell = HandlerUtil.getActiveShell(event); + + + doExecute(selection, activeShell, new NullProgressMonitor()); + return null; + + } + + protected void doExecute(IStructuredSelection selection, Shell activeShell, IProgressMonitor monitor) { + + Iterator selectionIterator = selection.iterator(); + + MultiStatus result = new MultiStatus(Activator.ID, IStatus.OK, "The palette configuration has been successfully deployed and activated", null); + + while(selectionIterator.hasNext()) { + Object selectedElement = selectionIterator.next(); + if(selectedElement instanceof IAdaptable) { + IFile selectedFile = (IFile)((IAdaptable)selectedElement).getAdapter(IFile.class); + if(selectedFile == null) { + monitor.worked(1); + result.add(new Status(IStatus.ERROR, Activator.ID, "The selected element is not a file")); + continue; + } + + + String fileName = selectedFile.getFullPath().removeFileExtension().lastSegment(); + monitor.subTask("Deploy " + fileName); + + // retrieve info => open a dialog, filled by current opened editor ? + ProviderPriority priority = PapyrusPalettePreferences.getWorkspacePalettePriority(fileName); + String editorID = PapyrusPalettePreferences.getWorkspaceEditorID(fileName); + String paletteName = PapyrusPalettePreferences.getWorkspacePaletteName(fileName); + Set requiredProfiles = PapyrusPalettePreferences.getRequiredProfiles(fileName); + String path = selectedFile.getFullPath().toString(); + + + UpdateContentDialog dialog = new UpdateContentDialog(activeShell, fileName, paletteName, priority, editorID, requiredProfiles); + int returnCode = dialog.open(); + if(Dialog.OK==returnCode) { + boolean validUpdate = true; + boolean alreadyDeployed = false; + + // update values from the editor + if(dialog.paletteName !=null && dialog.paletteName.length()>0) { + paletteName = dialog.paletteName; + alreadyDeployed = true; + } else { + validUpdate = false; + } + + if(dialog.priority !=null ) { + priority = dialog.priority; + alreadyDeployed = true; + }else { + validUpdate = false; + } + + if(dialog.editorID !=null && dialog.editorID.length()>0) { + editorID = dialog.editorID; + alreadyDeployed = true; + }else { + validUpdate = false; + } + + if(dialog.requiredProfiles !=null && dialog.requiredProfiles.length()>0) { + requiredProfiles = PaletteUtil.getProfileSetFromString(dialog.requiredProfiles); + }else { + validUpdate = false; + } + + if(validUpdate) { + if(alreadyDeployed) { + // update values and set visible again + PapyrusPalettePreferences.addWorkspacePalette(fileName, paletteName, path, priority, editorID, requiredProfiles); + PapyrusPalettePreferences.changePaletteVisibility(fileName, editorID, true); + result.add(new Status(IStatus.OK, Activator.ID, "The palette configuration was already deployed, it has just been activated")); + } else { + // just add the palette + PapyrusPalettePreferences.addWorkspacePalette(fileName, paletteName, path, priority, editorID, requiredProfiles); + result.add(new Status(IStatus.OK, Activator.ID, "The palette configuration has been successfully deployed and activated")); + } + } else { + result.add(new Status(IStatus.ERROR, Activator.ID, "The palette configuration was not deployed, because dialog content was not valid")); + } + } else { + result.add(new Status(IStatus.ERROR, Activator.ID, "The palette configuration was not deployed, because user did cancel the dialog")); + } + + } + } + + if(result.getChildren().length == 1) { + if(result.isOK()) { + MessageDialog.openInformation(activeShell, "Success", result.getMessage()); + } else if(result.getSeverity() < IStatus.ERROR) { //Errors are already logged + StatusManager.getManager().handle(result, StatusManager.SHOW); + } + } else { //Merge the result and specify an appropriate message based on the result + if(result.isOK()) { + MessageDialog.openInformation(activeShell, "Success", result.getMessage()); + } else { + MultiStatus actualResult = new MultiStatus(Activator.ID, result.getCode(), "Some errors occurred during the deployment", result.getException()); + actualResult.merge(result); + } + } + } + + + public static class UpdateContentDialog extends TrayDialog { + public String paletteName; + public ProviderPriority priority; + public String editorID; + public String requiredProfiles ; + public String fileName; + private Text nameText; + private Text editorText; + private Text profilesText; + private CCombo priorityCombo; + + + /** + * @param shell + * @param priority + * @param editorID + * @param requiredProfiles + */ + protected UpdateContentDialog(Shell shell, String fileName, String paletteName, ProviderPriority priority, String editorID, Set requiredProfiles) { + super(shell); + this.fileName = fileName; + this.paletteName = paletteName; + this.priority = priority; + this.editorID = editorID; + if(requiredProfiles !=null) { + this.requiredProfiles = PaletteUtil.getSerializedProfileList(requiredProfiles); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected void configureShell(Shell newShell) { + super.configureShell(newShell); + if(newShell!=null) { + newShell.setText("Configure Deployment of the palette"); + newShell.setSize(600, 400); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected Control createDialogArea(Composite parent) { + Composite superComposite = (Composite) super.createDialogArea(parent); + Composite composite = new Composite(superComposite, SWT.NONE); + composite.setLayout(new GridLayout(2, false)); + composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); + + // new grid data will all necessary info + Label nameLabel = new Label(composite, SWT.NONE); + nameLabel.setText("Name:"); + nameText = new Text(composite, SWT.BORDER); + if(paletteName == null) { + paletteName = fileName; + } + nameText.setText(paletteName); + nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); + + Label priorityLabel = new Label(composite, SWT.NONE); + priorityLabel.setText("Priority:"); + priorityCombo = new CCombo(composite, SWT.BORDER); + priorityCombo.setEditable(false); + priorityCombo.setItems(new String[] {ProviderPriority.LOWEST.getName(), ProviderPriority.LOW.getName(), ProviderPriority.MEDIUM.getName(), ProviderPriority.HIGH.getName(), ProviderPriority.HIGHEST.getName()}); + if(ProviderPriority.LOWEST.equals(priority)) { + priorityCombo.select(0); + } else if(ProviderPriority.LOW.equals(priority)) { + priorityCombo.select(1); + } else if(ProviderPriority.MEDIUM.equals(priority)) { + priorityCombo.select(2); + } else if(ProviderPriority.HIGH.equals(priority)) { + priorityCombo.select(3); + } else if(ProviderPriority.HIGHEST.equals(priority)) { + priorityCombo.select(4); + } else { + priorityCombo.select(2); // default = medium + } + priorityCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); + + Label editorLabel = new Label(composite, SWT.NONE); + editorLabel.setText("Editor:"); + editorText = new Text(composite, SWT.BORDER); + if(editorID == null) { + // TODO: try to see if a Papyrus editor is currently opened? + editorID = ""; + } + editorText.setText(editorID); + editorText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); + + // list of profiles + Label profilesLabel = new Label(composite, SWT.NONE); + profilesLabel.setText("Profiles:"); + profilesText = new Text(composite, SWT.BORDER); + if(requiredProfiles != null) { + profilesText.setText(requiredProfiles); + } + profilesText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); + + return superComposite; + } + + /** + * {@inheritDoc} + */ + @Override + protected void okPressed() { + // updates values + if(nameText!=null && ! nameText.isDisposed()) { + paletteName = nameText.getText(); + } + + if(editorText!=null && ! editorText.isDisposed()) { + editorID = editorText.getText(); + } + + if(priorityCombo!=null && ! priorityCombo.isDisposed()) { + priority = ProviderPriority.parse(priorityCombo.getText()); + } + + if(profilesText!=null && ! profilesText.isDisposed()) { + requiredProfiles = profilesText.getText(); + } + + super.okPressed(); + } + + } +} \ No newline at end of file diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/UndeployPaletteConfigurationHandler.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/UndeployPaletteConfigurationHandler.java new file mode 100644 index 00000000000..ca09effadc7 --- /dev/null +++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/handler/UndeployPaletteConfigurationHandler.java @@ -0,0 +1,112 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.customization.palette.handler; + +import java.util.Iterator; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.uml.diagram.common.Activator; +import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPalettePreferences; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.statushandlers.StatusManager; + + +/** + * @author RS211865 + */ +public class UndeployPaletteConfigurationHandler extends AbstractHandler { + + /** + * {@inheritDoc} + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection currentSelection = HandlerUtil.getCurrentSelection(event); + if(!(currentSelection instanceof IStructuredSelection) || currentSelection.isEmpty()) { + return null; + } + + final IStructuredSelection selection = (IStructuredSelection)currentSelection; + + final Shell activeShell = HandlerUtil.getActiveShell(event); + + + doExecute(selection,activeShell, new NullProgressMonitor()); + return null; + } + + protected void doExecute(IStructuredSelection selection, Shell activeShell, IProgressMonitor monitor) { + Iterator selectionIterator = selection.iterator(); + + MultiStatus result = new MultiStatus(Activator.ID, IStatus.OK, "The palette configuration has been successfully deactivated and undeployed", null); + + while(selectionIterator.hasNext()) { + Object selectedElement = selectionIterator.next(); + if(selectedElement instanceof IAdaptable) { + IFile selectedFile = (IFile)((IAdaptable)selectedElement).getAdapter(IFile.class); + if(selectedFile == null) { + monitor.worked(1); + result.add(new Status(IStatus.ERROR, Activator.ID, "The selected element is not a file")); + continue; + } + + + String fileName = selectedFile.getFullPath().removeFileExtension().lastSegment(); + monitor.subTask("Undeploy " + fileName); + + // do not delete. + // PapyrusPalettePreferences.deleteWorkspacePalette(fileName); + + // if not deploy, do nothing and onlyh warn + String editorId = PapyrusPalettePreferences.getWorkspaceEditorID(fileName); + if(editorId == null) { + // not deployed: cancel the undeploy action + MessageDialog.openInformation(activeShell, "Not deployed", "This palette is currently not deployed"); + result.add(new Status(IStatus.ERROR, Activator.ID, "The palette configuration "+fileName+" was not undeployed already")); + } else { + // change visibility instead => + PapyrusPalettePreferences.changePaletteVisibility(fileName, editorId, false); + result.add(new Status(IStatus.OK, Activator.ID, "The palette configuration "+fileName+" has been successfully deactivated and undeployed")); + } + + } + } + + if(result.getChildren().length == 1) { + if(result.isOK()) { + MessageDialog.openInformation(activeShell, "Success", result.getMessage()); + } else if(result.getSeverity() < IStatus.ERROR) { //Errors are already logged + StatusManager.getManager().handle(result, StatusManager.SHOW); + } + } else { //Merge the result and specify an appropriate message based on the result + if(result.isOK()) { + MessageDialog.openInformation(activeShell, "Success", result.getMessage()); + } else { + MultiStatus actualResult = new MultiStatus(Activator.ID, result.getCode(), "Some errors occurred during the deployment", result.getException()); + actualResult.merge(result); + } + } + } +} diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.classpath b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.project b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.project new file mode 100644 index 00000000000..f9dad31a62c --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.extendedtypes.elementtypeview + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..e0c53be06c4 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.emf.facet.common.ui, + org.eclipse.gmf.runtime.diagram.ui, + org.eclipse.papyrus.editor;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.0.0", + org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0", + org.eclipse.papyrus.infra.core;bundle-version="1.0.0" +Export-Package: org.eclipse.papyrus.infra.extendedtypes.elementtypeview, + org.eclipse.papyrus.infra.extendedtypes.elementtypeview.view +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.0.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.infra.extendedtypes.elementtypev + iew.Activator +Bundle-SymbolicName: org.eclipse.papyrus.infra.extendedtypes.elementty + peview;singleton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/about.html b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

    About This Content

    + +

    June 5, 2007

    +

    License

    + +

    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 http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

    + +

    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 http://www.eclipse.org.

    + + + diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/build.properties b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/build.properties new file mode 100644 index 00000000000..c659c55e85e --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties,\ + plugin.xml diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.properties b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.properties new file mode 100644 index 00000000000..4760ab80448 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.emf.commandstack +providerName = Eclipse Modeling Project +pluginName = A View for editpolicies diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.xml b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.xml new file mode 100644 index 00000000000..a59861ee580 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/plugin.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/Activator.java b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/Activator.java new file mode 100644 index 00000000000..f8555ee6d11 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/Activator.java @@ -0,0 +1,57 @@ +package org.eclipse.papyrus.infra.extendedtypes.elementtypeview; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +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.extendedtypes.elementtypeview"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + public static LogHelper log; + + /** + * 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; + log = new LogHelper(this); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + log = null; + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeLabelProvider.java b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeLabelProvider.java new file mode 100644 index 00000000000..bd3f41e2d9b --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeLabelProvider.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * 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: + * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation + * Based on edit policy view from patrick.tessier@cea.fr + * + */ +package org.eclipse.papyrus.infra.extendedtypes.elementtypeview.view; + +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.jface.viewers.ILabelProviderListener; +import org.eclipse.jface.viewers.ITableColorProvider; +import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; + + +/** + * This is the label provider to display figures + * + */ +public class ElementTypeLabelProvider implements ITableLabelProvider, ITableColorProvider { + + protected Color papyrusColor = new Color(Display.getDefault(), 0, 127, 14); + + protected Color customizableDropEditPolicyColor = new Color(Display.getDefault(), 0, 38, 255); + + public void removeListener(ILabelProviderListener listener) { + } + + public boolean isLabelProperty(Object element, String property) { + return false; + } + + public void dispose() { + } + + public void addListener(ILabelProviderListener listener) { + } + + public String getColumnText(Object element, int columnIndex) { + if(element instanceof IElementType) { + IElementType elementType = (IElementType)element; + switch(columnIndex) { + case 0: + String name = elementType.getDisplayName(); + return name; + case 1: + return elementType.getId(); + } + } + return "cannot display element: " + element; + } + + public Image getColumnImage(Object element, int columnIndex) { + return null; + } + + public Color getForeground(Object element, int columnIndex) { + return null; + } + + public Color getBackground(Object element, int columnIndex) { + return null; + } +}; diff --git a/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeView.java b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeView.java new file mode 100644 index 00000000000..17e2b537115 --- /dev/null +++ b/plugins/developer/org.eclipse.papyrus.infra.extendedtypes.elementtypeview/src/org/eclipse/papyrus/infra/extendedtypes/elementtypeview/view/ElementTypeView.java @@ -0,0 +1,245 @@ +/***************************************************************************** + * 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: + * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation + * Based on edit policy view from patrick.tessier@cea.fr + */ +package org.eclipse.papyrus.infra.extendedtypes.elementtypeview.view; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IClientContext; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.viewers.IContentProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.extendedtypes.elementtypeview.Activator; +import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CLabel; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; +import org.eclipse.ui.ISelectionListener; +import org.eclipse.ui.ISelectionService; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.ViewPart; + +/** + * This class shows the figure hierarchy attached to a edit-part + * + */ +public class ElementTypeView extends ViewPart { + + private ISelectionListener myEditPartlistener; + + private TreeViewer viewer; + + private CLabel selectedElement; + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.part.WorkbenchPart#setFocus() + */ + public void setFocus() { + Viewer viewer = getViewer(); + if(viewer != null && !viewer.getControl().isDisposed()) { + viewer.getControl().setFocus(); + } + } + + /** + * Create the main tree control + * + * @param parent + * @return Tree + */ + protected Tree createTree(Composite parent) { + Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); + tree.setLinesVisible(true); + return tree; + } + + /** + * Return the viewer. + * + * @return TreeViewer + */ + protected TreeViewer getViewer() { + return viewer; + } + + /** + * + * Constructor. + * + */ + public ElementTypeView() { + myEditPartlistener = new ISelectionListener() { + + public void selectionChanged(IWorkbenchPart part, ISelection selection) { + if(selection instanceof IStructuredSelection) { + Object selectedobject = ((IStructuredSelection)selection).getFirstElement(); + IClientContext papyrusContext; + try { + papyrusContext = TypeContext.getContext(); + } catch (ServiceException e) { + Activator.log.error(e); + if(viewer != null) { + viewer.setInput(new Object[0]); + viewer.expandAll(); + } + return; + } + EObject selectedEObject = null; + if(selectedobject instanceof EObject) { + selectedEObject = (EObject)selectedobject; + } else if(selectedobject instanceof IAdaptable) { + selectedEObject = (EObject)((IAdaptable)selectedobject).getAdapter(EObject.class); + } + + if(selectedElement != null && !selectedElement.isDisposed()) { + selectedElement.setText((selectedEObject != null ) ? selectedEObject.toString() : "" ); + } + + if(viewer != null) { + if(selectedEObject ==null) { + viewer.setInput(new IElementType[0]); + } else { + viewer.setInput(ElementTypeRegistry.getInstance().getAllTypesMatching(selectedEObject, papyrusContext)); + viewer.expandAll(); + } + } + } + } + }; + ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService(); + selectionService.addSelectionListener(myEditPartlistener); + } + + protected void createColumns() { + viewer.getTree().setHeaderVisible(true); + viewer.getTree().setLinesVisible(true); + TreeColumn tcName = new TreeColumn(viewer.getTree(), SWT.LEFT); + tcName.setText("Element Type"); + tcName.setWidth(300); + TreeColumn tcIdentifier = new TreeColumn(viewer.getTree(), SWT.LEFT); + tcIdentifier.setText("Identifier"); + tcIdentifier.setWidth(250); + // TreeColumn tcLayoutManager = new TreeColumn(viewer.getTree(), SWT.LEFT); + // tcLayoutManager.setText("Layout manager"); + // tcLayoutManager.setWidth(150); + // TreeColumn tcBorder = new TreeColumn(viewer.getTree(), SWT.LEFT); + // tcBorder.setText("Border"); + // tcBorder.setWidth(150); + } + + @Override + public void createPartControl(final org.eclipse.swt.widgets.Composite parent) { + final IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager(); + tbm.add(getClearViewAction()); + Composite composite = new Composite(parent, SWT.BORDER); + composite.setLayout(new GridLayout(1, true)); + selectedElement = new CLabel(composite, SWT.NONE); + selectedElement.setText(""); + selectedElement.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + Tree tree= createTree(composite); + tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + viewer = new TreeViewer(tree); + viewer.setContentProvider(getContentProvider()); + viewer.setLabelProvider(getLabelProvider()); + createColumns(); + } + + protected ITableLabelProvider getLabelProvider() { + return new ElementTypeLabelProvider(); + } + + protected Action getClearViewAction() { + return new Action() { + + @Override + public void run() { + clear(); + } + + @Override + public boolean isEnabled() { + return true; + } + + @Override + public String getToolTipText() { + return getText(); + } + + @Override + public String getText() { + return "Clear the view"; + } + }; + } + + protected IContentProvider getContentProvider() { + return new ITreeContentProvider() { + + public Object[] getElements(final Object inputElement) { + if(inputElement instanceof IElementType[]) { + return (IElementType[])inputElement; + } + return null; + } + + public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { + // nothing + } + + public void dispose() { + // nothing + } + + public boolean hasChildren(final Object element) { + return false; + } + + public Object getParent(final Object element) { + return null; + } + + public Object[] getChildren(final Object parentElement) { + return new Object[0]; + } + }; + } + + @Override + public void dispose() { + super.dispose(); + ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService(); + selectionService.removeSelectionListener(myEditPartlistener); + } + + private void clear() { + selectedElement.setText(""); + viewer.setInput(null); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.classpath b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.classpath new file mode 100644 index 00000000000..240e23bfdc0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.project b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.project new file mode 100644 index 00000000000..0175da62ef3 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.extendedtypes.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..416f4fb6960 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +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.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +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/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..f12e73d44d5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/META-INF/MANIFEST.MF @@ -0,0 +1,26 @@ +Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.provider, + org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider, + org.eclipse.papyrus.infra.extendedtypes.provider +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0";visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, + org.eclipse.uml2.uml;visibility:=reexport, + org.eclipse.uml2.uml.edit;visibility:=reexport, + org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0" +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 1.0.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.infra.extendedtypes.provider.Ext + endedTypesEditPlugin$Implementation +Bundle-SymbolicName: org.eclipse.papyrus.infra.extendedtypes.edit;sing + leton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/about.html b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

    About This Content

    + +

    June 5, 2007

    +

    License

    + +

    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 http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

    + +

    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 http://www.eclipse.org.

    + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/build.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/build.properties new file mode 100644 index 00000000000..9c53427d507 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/build.properties @@ -0,0 +1,22 @@ +# 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: +# CEA LIST - Initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html +jars.compile.order = . +source.. = src-gen/,\ + src/ +output.. = bin/ +src.includes = about.html diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateActionConfiguration_preValidationQueryConfiguration_ModiscoQueryConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateActionConfiguration_preValidationQueryConfiguration_ModiscoQueryConfiguration.gif new file mode 100644 index 00000000000..d75e4636bcb Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateActionConfiguration_preValidationQueryConfiguration_ModiscoQueryConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectSemanticTypeConfiguration_adviceConfiguration_AspectSemanticTypeAdviceConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectSemanticTypeConfiguration_adviceConfiguration_AspectSemanticTypeAdviceConfiguration.gif new file mode 100644 index 00000000000..48054300c70 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectSemanticTypeConfiguration_adviceConfiguration_AspectSemanticTypeAdviceConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectViewTypeConfiguration_adviceConfiguration_AspectViewTypeAdviceConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectViewTypeConfiguration_adviceConfiguration_AspectViewTypeAdviceConfiguration.gif new file mode 100644 index 00000000000..8640819ef61 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateAspectViewTypeConfiguration_adviceConfiguration_AspectViewTypeAdviceConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateConfigurationElement_iconEntry_IconEntry.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateConfigurationElement_iconEntry_IconEntry.gif new file mode 100644 index 00000000000..f33bed84b34 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateConfigurationElement_iconEntry_IconEntry.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectSemanticTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectSemanticTypeConfiguration.gif new file mode 100644 index 00000000000..dea9e2d9379 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectSemanticTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectViewTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectViewTypeConfiguration.gif new file mode 100644 index 00000000000..1f765e12d39 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_AspectViewTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_InvariantSemanticTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_InvariantSemanticTypeConfiguration.gif new file mode 100644 index 00000000000..ddad704eaf3 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateExtendedElementTypeSet_elementType_InvariantSemanticTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantContainerConfiguration_permissions_HierarchyPermission.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantContainerConfiguration_permissions_HierarchyPermission.gif new file mode 100644 index 00000000000..86ec735a156 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantContainerConfiguration_permissions_HierarchyPermission.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantHierarchyConfiguration_permissions_HierarchyPermission.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantHierarchyConfiguration_permissions_HierarchyPermission.gif new file mode 100644 index 00000000000..7afe9dc1af9 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantHierarchyConfiguration_permissions_HierarchyPermission.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantConfiguration_InvariantHierarchyConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantConfiguration_InvariantHierarchyConfiguration.gif new file mode 100644 index 00000000000..5fcdce8997b Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantConfiguration_InvariantHierarchyConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_AndRule.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_AndRule.gif new file mode 100644 index 00000000000..285bf7f552c Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_AndRule.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_OrRule.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_OrRule.gif new file mode 100644 index 00000000000..412157824c8 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/ctool16/CreateInvariantSemanticTypeConfiguration_invariantRuleConfiguration_OrRule.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AndRule.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AndRule.gif new file mode 100644 index 00000000000..33a997a1606 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AndRule.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeAdviceConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeAdviceConfiguration.gif new file mode 100644 index 00000000000..c414fe9f728 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeAdviceConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeConfiguration.gif new file mode 100644 index 00000000000..89ad5da38ab Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectSemanticTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeAdviceConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeAdviceConfiguration.gif new file mode 100644 index 00000000000..8a5c70cbd74 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeAdviceConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeConfiguration.gif new file mode 100644 index 00000000000..7b7c428c715 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/AspectViewTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ElementTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ElementTypeConfiguration.gif new file mode 100644 index 00000000000..94c953e013b Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ElementTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ExtendedElementTypeSet.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ExtendedElementTypeSet.gif new file mode 100644 index 00000000000..e4bc22dd17e Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/ExtendedElementTypeSet.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/HierarchyPermission.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/HierarchyPermission.gif new file mode 100644 index 00000000000..c4a8af41844 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/HierarchyPermission.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/IconEntry.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/IconEntry.gif new file mode 100644 index 00000000000..caf2804510d Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/IconEntry.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantConfiguration.gif new file mode 100644 index 00000000000..ef56c140853 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantContainerConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantContainerConfiguration.gif new file mode 100644 index 00000000000..134551bff7e Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantContainerConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantHierarchyConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantHierarchyConfiguration.gif new file mode 100644 index 00000000000..420eee17752 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantHierarchyConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantSemanticTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantSemanticTypeConfiguration.gif new file mode 100644 index 00000000000..ef56c140853 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/InvariantSemanticTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/OrRule.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/OrRule.gif new file mode 100644 index 00000000000..48e3cf22687 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/icons/full/obj16/OrRule.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.properties new file mode 100644 index 00000000000..f67178ef665 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.properties @@ -0,0 +1,88 @@ +# 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: +# CEA LIST - Initial API and implementation + +pluginName = InvariantHierarchyConfiguration Edit Support (Incubation) +providerName = Eclipse Modeling Project + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} | {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_Unknown_datatype= Value + +_UI_InvariantSemanticTypeConfiguration_type = Invariant Semantic Type Configuration +_UI_InvariantConfiguration_type = Invariant Configuration +_UI_InvariantSemanticTypeConfiguration_invariantConfiguration_feature = Invariant Configuration +_UI_InvariantConfiguration_parentType_feature = Parent Type +_UI_ExtendedElementTypeSet_type = Extended Element Type Set +_UI_ElementTypeConfiguration_type = Element Type Configuration +_UI_IconEntry_type = Icon Entry +_UI_ConfigurationElement_type = Configuration Element +_UI_ViewTypeAdviceConfiguration_type = View Type Advice Configuration +_UI_SemanticTypeAdviceConfiguration_type = Semantic Type Advice Configuration +_UI_MatcherConfiguration_type = Matcher Configuration +_UI_ActionConfiguration_type = Action Configuration +_UI_ViewActionConfiguration_type = View Action Configuration +_UI_SemanticActionConfiguration_type = Semantic Action Configuration +_UI_SemanticTypeConfiguration_type = Semantic Type Configuration +_UI_ViewTypeConfiguration_type = View Type Configuration +_UI_ElementTypeAdviceConfiguration_type = Element Type Advice Configuration +_UI_ExtendedElementTypeSet_elementType_feature = Element Type +_UI_ElementTypeConfiguration_hint_feature = Hint +_UI_ElementTypeConfiguration_kindName_feature = Kind Name +_UI_ElementTypeConfiguration_specializedTypesID_feature = Specialized Types ID +_UI_IconEntry_iconPath_feature = Icon Path +_UI_IconEntry_bundleId_feature = Bundle Id +_UI_ConfigurationElement_name_feature = Name +_UI_ConfigurationElement_description_feature = Description +_UI_ConfigurationElement_identifier_feature = Identifier +_UI_ConfigurationElement_iconEntry_feature = Icon Entry +_UI_ActionConfiguration_preValidationQueryConfiguration_feature = Pre Validation Query Configuration +_UI_ViewTypeConfiguration_specializedDiagramTypeID_feature = Specialized Diagram Type ID +_UI_ElementTypeAdviceConfiguration_matcherConfiguration_feature = Matcher Configuration +_UI_AspectSemanticTypeConfiguration_type = Aspect Semantic Type Configuration +_UI_AspectSemanticTypeAdviceConfiguration_type = Semantic Type Advice Configuration +_UI_AspectSemanticTypeConfiguration_adviceConfiguration_feature = Advice Configuration +_UI_AspectSemanticTypeAdviceConfiguration_preActionConfiguration_feature = Pre Action Configuration +_UI_AspectSemanticTypeAdviceConfiguration_postActionConfiguration_feature = Post Action Configuration +_UI_Unknown_feature = Unspecified + +_UI_InvariantHierarchyConfiguration_type = Invariant Hierarchy Configuration +_UI_HierarchyPermission_type = Hierarchy Permission +_UI_Unknown_type = Object + _UI_InvariantHierarchyConfiguration_permissions_feature = Permissions +_UI_HierarchyPermission_parentType_feature = Parent Type +_UI_HierarchyPermission_isPermitted_feature = Is Permitted +_UI_HierarchyPermission_directContainerLevelOnly_feature = Direct Container Level Only +_UI_ExtendedElementTypeSet_extensible_feature = Extensible +_UI_InvariantRuleConfiguration_type = Invariant Rule Configuration +_UI_ComposedRuleConfiguration_type = Composed Rule Configuration +_UI_AndRule_type = And Rule +_UI_OrRule_type = Or Rule +_UI_InvariantSemanticTypeConfiguration_invariantRuleConfiguration_feature = Invariant Rule Configuration +_UI_ComposedRuleConfiguration_composedRules_feature = Composed Rules +_UI_ElementTypeConfiguration_matcherConfiguration_feature = Matcher Configuration +_UI_HierarchyPermission_isStrict_feature = Is Strict +_UI_InvariantContainerConfiguration_type = Invariant Container Configuration +_UI_InvariantContainerConfiguration_permissions_feature = Permissions +_UI_HierarchyPermission_childType_feature = Child Type +_UI_AspectViewTypeConfiguration_type = Aspect View Type Configuration +_UI_AspectViewTypeAdviceConfiguration_type = Aspect View Type Advice Configuration +_UI_AspectViewTypeConfiguration_adviceConfiguration_feature = Advice Configuration +_UI_AspectViewTypeAdviceConfiguration_preActionConfiguration_feature = Pre Action Configuration +_UI_AspectViewTypeAdviceConfiguration_postActionConfiguration_feature = Post Action Configuration +_UI_AspectSemanticTypeConfiguration_actionConfiguration_feature = Action Configuration +_UI_AspectViewTypeConfiguration_actionConfiguration_feature = Action Configuration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.xml new file mode 100644 index 00000000000..d3502964191 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/plugin.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/HierarchyPermissionItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/HierarchyPermissionItemProvider.java new file mode 100644 index 00000000000..a39144c9ca0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/HierarchyPermissionItemProvider.java @@ -0,0 +1,216 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission} object. + * + * + * @generated + */ +public class HierarchyPermissionItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public HierarchyPermissionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addChildTypePropertyDescriptor(object); + addIsPermittedPropertyDescriptor(object); + addIsStrictPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Child Type feature. + * + * + * @generated + */ + protected void addChildTypePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_HierarchyPermission_childType_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_HierarchyPermission_childType_feature", "_UI_HierarchyPermission_type"), + InvariantContainerConfigurationPackage.Literals.HIERARCHY_PERMISSION__CHILD_TYPE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Is Permitted feature. + * + * + * @generated + */ + protected void addIsPermittedPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_HierarchyPermission_isPermitted_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_HierarchyPermission_isPermitted_feature", "_UI_HierarchyPermission_type"), + InvariantContainerConfigurationPackage.Literals.HIERARCHY_PERMISSION__IS_PERMITTED, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Is Strict feature. + * + * + * @generated + */ + protected void addIsStrictPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_HierarchyPermission_isStrict_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_HierarchyPermission_isStrict_feature", "_UI_HierarchyPermission_type"), + InvariantContainerConfigurationPackage.Literals.HIERARCHY_PERMISSION__IS_STRICT, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns HierarchyPermission.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/HierarchyPermission")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((HierarchyPermission)object).getChildType(); + return label == null || label.length() == 0 ? + getString("_UI_HierarchyPermission_type") : + getString("_UI_HierarchyPermission_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(HierarchyPermission.class)) { + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__CHILD_TYPE: + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_PERMITTED: + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_STRICT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return InvariantContainerConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationEditPlugin.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationEditPlugin.java new file mode 100644 index 00000000000..6911e9a7bb5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationEditPlugin.java @@ -0,0 +1,108 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider.InvariantSemanticTypeConfigurationEditPlugin; + +import org.eclipse.papyrus.infra.extendedtypes.provider.ExtendedTypesEditPlugin; + +/** + * This is the central singleton for the InvariantContainerConfiguration edit plugin. + * + * + * @generated + */ +public final class InvariantContainerConfigurationEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final InvariantContainerConfigurationEditPlugin INSTANCE = new InvariantContainerConfigurationEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public InvariantContainerConfigurationEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + ExtendedTypesEditPlugin.INSTANCE, + InvariantSemanticTypeConfigurationEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProvider.java new file mode 100644 index 00000000000..b365eac0d98 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProvider.java @@ -0,0 +1,179 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationFactory; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider.InvariantRuleConfigurationItemProvider; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration} object. + * + * + * @generated + */ +public class InvariantContainerConfigurationItemProvider + extends InvariantRuleConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public InvariantContainerConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(InvariantContainerConfigurationPackage.Literals.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns InvariantContainerConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InvariantContainerConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_InvariantContainerConfiguration_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(InvariantContainerConfiguration.class)) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (InvariantContainerConfigurationPackage.Literals.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS, + InvariantContainerConfigurationFactory.eINSTANCE.createHierarchyPermission())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return InvariantContainerConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProviderAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProviderAdapterFactory.java new file mode 100644 index 00000000000..2f28cb9042f --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/provider/InvariantContainerConfigurationItemProviderAdapterFactory.java @@ -0,0 +1,233 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util.InvariantContainerConfigurationAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class InvariantContainerConfigurationItemProviderAdapterFactory extends InvariantContainerConfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public InvariantContainerConfigurationItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration} instances. + * + * + * @generated + */ + protected InvariantContainerConfigurationItemProvider invariantContainerConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createInvariantContainerConfigurationAdapter() { + if (invariantContainerConfigurationItemProvider == null) { + invariantContainerConfigurationItemProvider = new InvariantContainerConfigurationItemProvider(this); + } + + return invariantContainerConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission} instances. + * + * + * @generated + */ + protected HierarchyPermissionItemProvider hierarchyPermissionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission}. + * + * + * @generated + */ + @Override + public Adapter createHierarchyPermissionAdapter() { + if (hierarchyPermissionItemProvider == null) { + hierarchyPermissionItemProvider = new HierarchyPermissionItemProvider(this); + } + + return hierarchyPermissionItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (invariantContainerConfigurationItemProvider != null) invariantContainerConfigurationItemProvider.dispose(); + if (hierarchyPermissionItemProvider != null) hierarchyPermissionItemProvider.dispose(); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/AndRuleItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/AndRuleItemProvider.java new file mode 100644 index 00000000000..7dcb962aa00 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/AndRuleItemProvider.java @@ -0,0 +1,116 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule} object. + * + * + * @generated + */ +public class AndRuleItemProvider + extends ComposedRuleConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public AndRuleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AndRule.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AndRule")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_AndRule_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/ComposedRuleConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/ComposedRuleConfigurationItemProvider.java new file mode 100644 index 00000000000..2a763e4c981 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/ComposedRuleConfigurationItemProvider.java @@ -0,0 +1,131 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration} object. + * + * + * @generated + */ +public class ComposedRuleConfigurationItemProvider + extends InvariantRuleConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ComposedRuleConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addComposedRulesPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Composed Rules feature. + * + * + * @generated + */ + protected void addComposedRulesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ComposedRuleConfiguration_composedRules_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ComposedRuleConfiguration_composedRules_feature", "_UI_ComposedRuleConfiguration_type"), + InvariantSemanticTypeConfigurationPackage.Literals.COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ComposedRuleConfiguration_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantRuleConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantRuleConfigurationItemProvider.java new file mode 100644 index 00000000000..7f23d4d5df6 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantRuleConfigurationItemProvider.java @@ -0,0 +1,119 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration} object. + * + * + * @generated + */ +public class InvariantRuleConfigurationItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public InvariantRuleConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_InvariantRuleConfiguration_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return InvariantSemanticTypeConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationEditPlugin.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationEditPlugin.java new file mode 100644 index 00000000000..7f0fe2db1a3 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationEditPlugin.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.papyrus.infra.extendedtypes.provider.ExtendedTypesEditPlugin; + +/** + * This is the central singleton for the InvariantSemanticTypeConfiguration edit plugin. + * + * + * @generated + */ +public final class InvariantSemanticTypeConfigurationEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final InvariantSemanticTypeConfigurationEditPlugin INSTANCE = new InvariantSemanticTypeConfigurationEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + ExtendedTypesEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..a4ba1ebcad9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProvider.java @@ -0,0 +1,187 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationFactory; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +import org.eclipse.papyrus.infra.extendedtypes.provider.SemanticTypeConfigurationItemProvider; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration} object. + * + * + * @generated + */ +public class InvariantSemanticTypeConfigurationItemProvider + extends SemanticTypeConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(InvariantSemanticTypeConfigurationPackage.Literals.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns InvariantSemanticTypeConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InvariantSemanticTypeConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InvariantSemanticTypeConfiguration)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_InvariantSemanticTypeConfiguration_type") : + getString("_UI_InvariantSemanticTypeConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(InvariantSemanticTypeConfiguration.class)) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (InvariantSemanticTypeConfigurationPackage.Literals.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION, + InvariantSemanticTypeConfigurationFactory.eINSTANCE.createAndRule())); + + newChildDescriptors.add + (createChildParameter + (InvariantSemanticTypeConfigurationPackage.Literals.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION, + InvariantSemanticTypeConfigurationFactory.eINSTANCE.createOrRule())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return InvariantSemanticTypeConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProviderAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProviderAdapterFactory.java new file mode 100644 index 00000000000..9c73d4082a9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/InvariantSemanticTypeConfigurationItemProviderAdapterFactory.java @@ -0,0 +1,361 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.edit.command.CommandParameter; + +import org.eclipse.emf.edit.domain.EditingDomain; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IChildCreationExtender; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationFactory; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util.InvariantSemanticTypeConfigurationAdapterFactory; + +import org.eclipse.papyrus.infra.extendedtypes.util.ExtendedtypesSwitch; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class InvariantSemanticTypeConfigurationItemProviderAdapterFactory extends InvariantSemanticTypeConfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration} instances. + * + * + * @generated + */ + protected InvariantSemanticTypeConfigurationItemProvider invariantSemanticTypeConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createInvariantSemanticTypeConfigurationAdapter() { + if (invariantSemanticTypeConfigurationItemProvider == null) { + invariantSemanticTypeConfigurationItemProvider = new InvariantSemanticTypeConfigurationItemProvider(this); + } + + return invariantSemanticTypeConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule} instances. + * + * + * @generated + */ + protected AndRuleItemProvider andRuleItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule}. + * + * + * @generated + */ + @Override + public Adapter createAndRuleAdapter() { + if (andRuleItemProvider == null) { + andRuleItemProvider = new AndRuleItemProvider(this); + } + + return andRuleItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule} instances. + * + * + * @generated + */ + protected OrRuleItemProvider orRuleItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule}. + * + * + * @generated + */ + @Override + public Adapter createOrRuleAdapter() { + if (orRuleItemProvider == null) { + orRuleItemProvider = new OrRuleItemProvider(this); + } + + return orRuleItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (invariantSemanticTypeConfigurationItemProvider != null) invariantSemanticTypeConfigurationItemProvider.dispose(); + if (andRuleItemProvider != null) andRuleItemProvider.dispose(); + if (orRuleItemProvider != null) orRuleItemProvider.dispose(); + } + + /** + * A child creation extender for the {@link ExtendedtypesPackage}. + * + * + * @generated + */ + public static class ExtendedtypesChildCreationExtender implements IChildCreationExtender { + /** + * The switch for creating child descriptors specific to each extended class. + * + * + * @generated + */ + protected static class CreationSwitch extends ExtendedtypesSwitch { + /** + * The child descriptors being populated. + * + * + * @generated + */ + protected List newChildDescriptors; + + /** + * The domain in which to create the children. + * + * + * @generated + */ + protected EditingDomain editingDomain; + + /** + * Creates the a switch for populating child descriptors in the given domain. + * + * + * @generated + */ + CreationSwitch(List newChildDescriptors, EditingDomain editingDomain) { + this.newChildDescriptors = newChildDescriptors; + this.editingDomain = editingDomain; + } + /** + * + * + * @generated + */ + @Override + public Object caseExtendedElementTypeSet(ExtendedElementTypeSet object) { + newChildDescriptors.add + (createChildParameter + (ExtendedtypesPackage.eINSTANCE.getExtendedElementTypeSet_ElementType(), + InvariantSemanticTypeConfigurationFactory.eINSTANCE.createInvariantSemanticTypeConfiguration())); + + return null; + } + + /** + * + * + * @generated + */ + protected CommandParameter createChildParameter(Object feature, Object child) { + return new CommandParameter(null, feature, child); + } + + } + + /** + * + * + * @generated + */ + public Collection getNewChildDescriptors(Object object, EditingDomain editingDomain) { + ArrayList result = new ArrayList(); + new CreationSwitch(result, editingDomain).doSwitch((EObject)object); + return result; + } + + /** + * + * + * @generated + */ + public ResourceLocator getResourceLocator() { + return InvariantSemanticTypeConfigurationEditPlugin.INSTANCE; + } + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/OrRuleItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/OrRuleItemProvider.java new file mode 100644 index 00000000000..3bd63aa94bb --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/OrRuleItemProvider.java @@ -0,0 +1,116 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule} object. + * + * + * @generated + */ +public class OrRuleItemProvider + extends ComposedRuleConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public OrRuleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns OrRule.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/OrRule")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_OrRule_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ActionConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ActionConfigurationItemProvider.java new file mode 100644 index 00000000000..eb760da0f96 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ActionConfigurationItemProvider.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration} object. + * + * + * + * @generated + */ +public class ActionConfigurationItemProvider extends ConfigurationElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ActionConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ActionConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ActionConfiguration_type") : //$NON-NLS-1$ + getString("_UI_ActionConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectSemanticTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectSemanticTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..7bb9194dca9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectSemanticTypeConfigurationItemProvider.java @@ -0,0 +1,157 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration} object. + * + * + * + * @generated + */ +public class AspectSemanticTypeConfigurationItemProvider extends SemanticTypeConfigurationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public AspectSemanticTypeConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if(childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExtendedtypesPackage.eINSTANCE.getAspectSemanticTypeConfiguration_ActionConfiguration()); + } + return childrenFeatures; + } + + /** + * + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + return super.getChildFeature(object, child); + } + + /** + * This returns AspectSemanticTypeConfiguration.gif. + * + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AspectSemanticTypeConfiguration")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((AspectSemanticTypeConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_AspectSemanticTypeConfiguration_type") : //$NON-NLS-1$ + getString("_UI_AspectSemanticTypeConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(AspectSemanticTypeConfiguration.class)) { + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectViewTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectViewTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..172bc795759 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/AspectViewTypeConfigurationItemProvider.java @@ -0,0 +1,157 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration} object. + * + * + * + * @generated + */ +public class AspectViewTypeConfigurationItemProvider extends ViewTypeConfigurationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public AspectViewTypeConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if(childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExtendedtypesPackage.eINSTANCE.getAspectViewTypeConfiguration_ActionConfiguration()); + } + return childrenFeatures; + } + + /** + * + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + return super.getChildFeature(object, child); + } + + /** + * This returns AspectViewTypeConfiguration.gif. + * + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AspectViewTypeConfiguration")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((AspectViewTypeConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_AspectViewTypeConfiguration_type") : //$NON-NLS-1$ + getString("_UI_AspectViewTypeConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(AspectViewTypeConfiguration.class)) { + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ConfigurationElementItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ConfigurationElementItemProvider.java new file mode 100644 index 00000000000..2d40353f47a --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ConfigurationElementItemProvider.java @@ -0,0 +1,211 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesFactory; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement} object. + * + * + * + * @generated + */ +public class ConfigurationElementItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ConfigurationElementItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + addNamePropertyDescriptor(object); + addDescriptionPropertyDescriptor(object); + addIdentifierPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConfigurationElement_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ConfigurationElement_name_feature", "_UI_ConfigurationElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getConfigurationElement_Name(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Description feature. + * + * + * + * @generated + */ + protected void addDescriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConfigurationElement_description_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ConfigurationElement_description_feature", "_UI_ConfigurationElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getConfigurationElement_Description(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Identifier feature. + * + * + * + * @generated + */ + protected void addIdentifierPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConfigurationElement_identifier_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ConfigurationElement_identifier_feature", "_UI_ConfigurationElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getConfigurationElement_Identifier(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if(childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExtendedtypesPackage.eINSTANCE.getConfigurationElement_IconEntry()); + } + return childrenFeatures; + } + + /** + * + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ConfigurationElement)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ConfigurationElement_type") : //$NON-NLS-1$ + getString("_UI_ConfigurationElement_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(ConfigurationElement.class)) { + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__NAME: + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__DESCRIPTION: + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__IDENTIFIER: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + newChildDescriptors.add(createChildParameter(ExtendedtypesPackage.eINSTANCE.getConfigurationElement_IconEntry(), ExtendedtypesFactory.eINSTANCE.createIconEntry())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ExtendedTypesEditPlugin.INSTANCE; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeAdviceConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeAdviceConfigurationItemProvider.java new file mode 100644 index 00000000000..66dfb7c4207 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeAdviceConfigurationItemProvider.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration} object. + * + * + * + * @generated + */ +public class ElementTypeAdviceConfigurationItemProvider extends ConfigurationElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ElementTypeAdviceConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ElementTypeAdviceConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ElementTypeAdviceConfiguration_type") : //$NON-NLS-1$ + getString("_UI_ElementTypeAdviceConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..03354906931 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ElementTypeConfigurationItemProvider.java @@ -0,0 +1,206 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration} object. + * + * + * + * @generated + */ +public class ElementTypeConfigurationItemProvider extends ConfigurationElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ElementTypeConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + addHintPropertyDescriptor(object); + addKindNamePropertyDescriptor(object); + addSpecializedTypesIDPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Hint feature. + * + * + * + * @generated + */ + protected void addHintPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ElementTypeConfiguration_hint_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementTypeConfiguration_hint_feature", "_UI_ElementTypeConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getElementTypeConfiguration_Hint(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Kind Name feature. + * + * + * + * @generated + */ + protected void addKindNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ElementTypeConfiguration_kindName_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementTypeConfiguration_kindName_feature", "_UI_ElementTypeConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getElementTypeConfiguration_KindName(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Specialized Types ID feature. + * + * + * + * @generated + */ + protected void addSpecializedTypesIDPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ElementTypeConfiguration_specializedTypesID_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementTypeConfiguration_specializedTypesID_feature", "_UI_ElementTypeConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getElementTypeConfiguration_SpecializedTypesID(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if(childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExtendedtypesPackage.eINSTANCE.getElementTypeConfiguration_MatcherConfiguration()); + } + return childrenFeatures; + } + + /** + * + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + return super.getChildFeature(object, child); + } + + /** + * This returns ElementTypeConfiguration.gif. + * + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementTypeConfiguration")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ElementTypeConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ElementTypeConfiguration_type") : //$NON-NLS-1$ + getString("_UI_ElementTypeConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(ElementTypeConfiguration.class)) { + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__HINT: + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__KIND_NAME: + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedElementTypeSetItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedElementTypeSetItemProvider.java new file mode 100644 index 00000000000..eb694d35eac --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedElementTypeSetItemProvider.java @@ -0,0 +1,179 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesFactory; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet} object. + * + * + * + * @generated + */ +public class ExtendedElementTypeSetItemProvider extends ConfigurationElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ExtendedElementTypeSetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + addExtensiblePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Extensible feature. + * + * + * + * @generated + */ + protected void addExtensiblePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExtendedElementTypeSet_extensible_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ExtendedElementTypeSet_extensible_feature", "_UI_ExtendedElementTypeSet_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getExtendedElementTypeSet_Extensible(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if(childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ExtendedtypesPackage.eINSTANCE.getExtendedElementTypeSet_ElementType()); + } + return childrenFeatures; + } + + /** + * + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + return super.getChildFeature(object, child); + } + + /** + * This returns ExtendedElementTypeSet.gif. + * + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ExtendedElementTypeSet")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ExtendedElementTypeSet)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ExtendedElementTypeSet_type") : //$NON-NLS-1$ + getString("_UI_ExtendedElementTypeSet_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(ExtendedElementTypeSet.class)) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + newChildDescriptors.add(createChildParameter(ExtendedtypesPackage.eINSTANCE.getExtendedElementTypeSet_ElementType(), ExtendedtypesFactory.eINSTANCE.createAspectSemanticTypeConfiguration())); + newChildDescriptors.add(createChildParameter(ExtendedtypesPackage.eINSTANCE.getExtendedElementTypeSet_ElementType(), ExtendedtypesFactory.eINSTANCE.createAspectViewTypeConfiguration())); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedTypesEditPlugin.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedTypesEditPlugin.java new file mode 100644 index 00000000000..edb1b0f2380 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedTypesEditPlugin.java @@ -0,0 +1,107 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +/** + * This is the central singleton for the ExtendedTypes edit plugin. + * + * + * + * @generated + */ +public final class ExtendedTypesEditPlugin extends EMFPlugin { + + /** + * Keep track of the singleton. + * + * + * + * @generated + */ + public static final ExtendedTypesEditPlugin INSTANCE = new ExtendedTypesEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * + * @generated + */ + public ExtendedTypesEditPlugin() { + super(new ResourceLocator[]{ EcoreEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + + /** + * Creates an instance. + * + * + * + * @generated + */ + public Implementation() { + super(); + // Remember the static instance. + // + plugin = this; + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedtypesItemProviderAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedtypesItemProviderAdapterFactory.java new file mode 100644 index 00000000000..4a0cf580978 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ExtendedtypesItemProviderAdapterFactory.java @@ -0,0 +1,301 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.util.ExtendedtypesAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * + * @generated + */ +public class ExtendedtypesItemProviderAdapterFactory extends ExtendedtypesAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * + * @generated + */ + public ExtendedtypesItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet} instances. + * + * + * + * @generated + */ + protected ExtendedElementTypeSetItemProvider extendedElementTypeSetItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet}. + * + * + * + * @generated + */ + @Override + public Adapter createExtendedElementTypeSetAdapter() { + if(extendedElementTypeSetItemProvider == null) { + extendedElementTypeSetItemProvider = new ExtendedElementTypeSetItemProvider(this); + } + return extendedElementTypeSetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry} instances. + * + * + * + * @generated + */ + protected IconEntryItemProvider iconEntryItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry}. + * + * + * + * @generated + */ + @Override + public Adapter createIconEntryAdapter() { + if(iconEntryItemProvider == null) { + iconEntryItemProvider = new IconEntryItemProvider(this); + } + return iconEntryItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration} instances. + * + * + * + * @generated + */ + protected AspectSemanticTypeConfigurationItemProvider aspectSemanticTypeConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration}. + * + * + * + * @generated + */ + @Override + public Adapter createAspectSemanticTypeConfigurationAdapter() { + if(aspectSemanticTypeConfigurationItemProvider == null) { + aspectSemanticTypeConfigurationItemProvider = new AspectSemanticTypeConfigurationItemProvider(this); + } + return aspectSemanticTypeConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration} instances. + * + * + * + * @generated + */ + protected AspectViewTypeConfigurationItemProvider aspectViewTypeConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration}. + * + * + * + * @generated + */ + @Override + public Adapter createAspectViewTypeConfigurationAdapter() { + if(aspectViewTypeConfigurationItemProvider == null) { + aspectViewTypeConfigurationItemProvider = new AspectViewTypeConfigurationItemProvider(this); + } + return aspectViewTypeConfigurationItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if(isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if(!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + return null; + } + + /** + * This adds a listener. + * + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + if(parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * + * @generated + */ + public void dispose() { + if(extendedElementTypeSetItemProvider != null) + extendedElementTypeSetItemProvider.dispose(); + if(iconEntryItemProvider != null) + iconEntryItemProvider.dispose(); + if(aspectSemanticTypeConfigurationItemProvider != null) + aspectSemanticTypeConfigurationItemProvider.dispose(); + if(aspectViewTypeConfigurationItemProvider != null) + aspectViewTypeConfigurationItemProvider.dispose(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/IconEntryItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/IconEntryItemProvider.java new file mode 100644 index 00000000000..e7afc328fb7 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/IconEntryItemProvider.java @@ -0,0 +1,170 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.IconEntry; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry} object. + * + * + * + * @generated + */ +public class IconEntryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public IconEntryItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + addIconPathPropertyDescriptor(object); + addBundleIdPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Icon Path feature. + * + * + * + * @generated + */ + protected void addIconPathPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IconEntry_iconPath_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IconEntry_iconPath_feature", "_UI_IconEntry_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getIconEntry_IconPath(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Bundle Id feature. + * + * + * + * @generated + */ + protected void addBundleIdPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IconEntry_bundleId_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IconEntry_bundleId_feature", "_UI_IconEntry_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getIconEntry_BundleId(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns IconEntry.gif. + * + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IconEntry")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((IconEntry)object).getIconPath(); + return label == null || label.length() == 0 ? getString("_UI_IconEntry_type") : //$NON-NLS-1$ + getString("_UI_IconEntry_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(IconEntry.class)) { + case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: + case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ExtendedTypesEditPlugin.INSTANCE; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/MatcherConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/MatcherConfigurationItemProvider.java new file mode 100644 index 00000000000..27dd09bdb67 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/MatcherConfigurationItemProvider.java @@ -0,0 +1,116 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration} object. + * + * + * + * @generated + */ +public class MatcherConfigurationItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public MatcherConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_MatcherConfiguration_type"); //$NON-NLS-1$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ExtendedTypesEditPlugin.INSTANCE; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticActionConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticActionConfigurationItemProvider.java new file mode 100644 index 00000000000..9f0af144d75 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticActionConfigurationItemProvider.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration} object. + * + * + * + * @generated + */ +public class SemanticActionConfigurationItemProvider extends ActionConfigurationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public SemanticActionConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((SemanticActionConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SemanticActionConfiguration_type") : //$NON-NLS-1$ + getString("_UI_SemanticActionConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..daef22d62ed --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/SemanticTypeConfigurationItemProvider.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration} object. + * + * + * + * @generated + */ +public class SemanticTypeConfigurationItemProvider extends ElementTypeConfigurationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public SemanticTypeConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((SemanticTypeConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SemanticTypeConfiguration_type") : //$NON-NLS-1$ + getString("_UI_SemanticTypeConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewActionConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewActionConfigurationItemProvider.java new file mode 100644 index 00000000000..792b87a0314 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewActionConfigurationItemProvider.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration} object. + * + * + * + * @generated + */ +public class ViewActionConfigurationItemProvider extends ActionConfigurationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ViewActionConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ViewActionConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ViewActionConfiguration_type") : //$NON-NLS-1$ + getString("_UI_ViewActionConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..6dff2dff365 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src-gen/org/eclipse/papyrus/infra/extendedtypes/provider/ViewTypeConfigurationItemProvider.java @@ -0,0 +1,128 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration} object. + * + * + * + * @generated + */ +public class ViewTypeConfigurationItemProvider extends ElementTypeConfigurationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + + /** + * This constructs an instance from a factory and a notifier. + * + * + * + * @generated + */ + public ViewTypeConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if(itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + addSpecializedDiagramTypeIDPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Specialized Diagram Type ID feature. + * + * + * + * @generated + */ + protected void addSpecializedDiagramTypeIDPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewTypeConfiguration_specializedDiagramTypeID_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ViewTypeConfiguration_specializedDiagramTypeID_feature", "_UI_ViewTypeConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ExtendedtypesPackage.eINSTANCE.getViewTypeConfiguration_SpecializedDiagramTypeID(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ViewTypeConfiguration)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ViewTypeConfiguration_type") : //$NON-NLS-1$ + getString("_UI_ViewTypeConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + switch(notification.getFeatureID(ViewTypeConfiguration.class)) { + case ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..fe7d1b0e9af --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProvider.java @@ -0,0 +1,113 @@ +/** + * + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantConfigurationModelCreation; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantRuleExtensionPoint; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; +import org.osgi.framework.Bundle; + +/** + * Specific Item provider for {@link InvariantSemanticTypeConfiguration} to add new childs given by extension points + * + */ +public class CustomInvariantSemanticTypeConfigurationItemProvider extends + InvariantSemanticTypeConfigurationItemProvider { + + protected Map> configurationToFactory = new HashMap>(); + + public CustomInvariantSemanticTypeConfigurationItemProvider( + AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + protected void collectNewChildDescriptors( + Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + +// // TODO try to implement this using the extension points => this should +// // be added automatically by each extension +// newChildDescriptors.add(createChildParameter( +// InvariantSemanticTypeConfigurationPackage.eINSTANCE.getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration(), +// InvariantContainerConfigurationFactory.eINSTANCE.createInvariantContainerConfiguration())); +// + addFromExtensionPoints(newChildDescriptors, object); + + } + + /** + * @param newChildDescriptors + * @param object + */ + protected void addFromExtensionPoints(Collection newChildDescriptors, Object object) { + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IInvariantRuleExtensionPoint.EXTENSION_POINT_ID); + // for each element, parses and retrieve the model file. then loads it and returns the root element + for(IConfigurationElement configurationElement : elements) { + // contributor will always be the same, but implementation could be different. + + + String configurationModelCreationClassName = configurationElement.getAttribute(IInvariantRuleExtensionPoint.CONFIGURATION_MODEL_CREATION); + if(configurationModelCreationClassName !=null) { + String contributorName = configurationElement.getContributor().getName(); + IInvariantConfigurationModelCreation configurationModelCreation = configurationToFactory.get(configurationModelCreationClassName); + if(configurationModelCreation == null) { + Class> configurationClass = null; + try { + configurationClass = loadInvariantRulecModelCreationClass(configurationModelCreationClassName, contributorName); + } catch (ClassNotFoundException e1) { + Activator.log.error(e1); + } + if(configurationClass != null) { + // instantiate class + try { + configurationModelCreation = configurationClass.newInstance(); + configurationToFactory.put(configurationModelCreationClassName, configurationModelCreation); + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + } + } + + if(configurationModelCreation !=null) { + newChildDescriptors.add(createChildParameter( + InvariantSemanticTypeConfigurationPackage.eINSTANCE.getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration(), + configurationModelCreation.createConfigurationModel())); + + } + } + } + } + + + @SuppressWarnings("unchecked") + protected Class> loadInvariantRulecModelCreationClass(String className, String bundleId) throws ClassNotFoundException { + Class> found = null; + Bundle bundle = basicGetBundle(bundleId); + if (bundle!=null){ + int state = bundle.getState(); + if ( state == org.osgi.framework.Bundle.ACTIVE || state == org.osgi.framework.Bundle.STARTING ){ + found = (Class>)bundle.loadClass(className); + return found; + } + } + return null; + } + + private static Bundle basicGetBundle(String bundleId) { + return Platform.getBundle(bundleId); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory.java new file mode 100644 index 00000000000..4d9123290d1 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/provider/CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory.java @@ -0,0 +1,26 @@ +/** + * + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider; + +import org.eclipse.emf.common.notify.Adapter; + +/** + * @author RS211865 + * + */ +public class CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory + extends InvariantSemanticTypeConfigurationItemProviderAdapterFactory { + + /** + * {@inheritDoc} + */ + @Override + public Adapter createInvariantSemanticTypeConfigurationAdapter() { + if (invariantSemanticTypeConfigurationItemProvider == null) { + invariantSemanticTypeConfigurationItemProvider = new CustomInvariantSemanticTypeConfigurationItemProvider(this); + } + + return invariantSemanticTypeConfigurationItemProvider; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomAspectSemanticTypeConfigurationItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomAspectSemanticTypeConfigurationItemProvider.java new file mode 100644 index 00000000000..1782c4a4965 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomAspectSemanticTypeConfigurationItemProvider.java @@ -0,0 +1,115 @@ +/***************************************************************************** + * Copyright (c) 2014 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.infra.extendedtypes.provider; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation; +import org.eclipse.papyrus.infra.extendedtypes.IAspectTypeExtensionPoint; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; +import org.osgi.framework.Bundle; + +/** + * Specific Item provider for {@link InvariantSemanticTypeConfiguration} to add new childs given by extension points + * + */ +public class CustomAspectSemanticTypeConfigurationItemProvider extends AspectSemanticTypeConfigurationItemProvider { + + protected Map> configurationToFactory = new HashMap>(); + + public CustomAspectSemanticTypeConfigurationItemProvider( + AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + protected void collectNewChildDescriptors( + Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + addFromExtensionPoints(newChildDescriptors, object); + + } + + /** + * @param newChildDescriptors + * @param object + */ + protected void addFromExtensionPoints(Collection newChildDescriptors, Object object) { + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IAspectTypeExtensionPoint.EXTENSION_POINT_ID); + // for each element, parses and retrieve the model file. then loads it and returns the root element + for(IConfigurationElement configurationElement : elements) { + // contributor will always be the same, but implementation could be different. + + + String configurationModelCreationClassName = configurationElement.getAttribute(IAspectTypeExtensionPoint.CONFIGURATION_MODEL_CREATION); + if(configurationModelCreationClassName !=null) { + String contributorName = configurationElement.getContributor().getName(); + IActionConfigurationModelCreation configurationModelCreation = configurationToFactory.get(configurationModelCreationClassName); + if(configurationModelCreation == null) { + Class> configurationClass = null; + try { + configurationClass = loadAspectActionConfigurationModelCreationClass(configurationModelCreationClassName, contributorName); + } catch (ClassNotFoundException e1) { + Activator.log.error(e1); + } + if(configurationClass != null) { + // instantiate class + try { + configurationModelCreation = configurationClass.newInstance(); + configurationToFactory.put(configurationModelCreationClassName, configurationModelCreation); + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + } + } + + if(configurationModelCreation !=null) { + newChildDescriptors.add(createChildParameter( + ExtendedtypesPackage.eINSTANCE.getAspectSemanticTypeConfiguration_ActionConfiguration(), + configurationModelCreation.createConfigurationModel())); + + } + } + } + } + + + @SuppressWarnings("unchecked") + protected Class> loadAspectActionConfigurationModelCreationClass(String className, String bundleId) throws ClassNotFoundException { + Class> found = null; + Bundle bundle = basicGetBundle(bundleId); + if (bundle!=null){ + int state = bundle.getState(); + if ( state == org.osgi.framework.Bundle.ACTIVE || state == org.osgi.framework.Bundle.STARTING ){ + found = (Class>)bundle.loadClass(className); + return found; + } + } + return null; + } + + private static Bundle basicGetBundle(String bundleId) { + return Platform.getBundle(bundleId); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedElementTypeSetItemProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedElementTypeSetItemProvider.java new file mode 100644 index 00000000000..02f451f10a7 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedElementTypeSetItemProvider.java @@ -0,0 +1,57 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationFactory; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet} + * object. + * + * @generated + */ +public class CustomExtendedElementTypeSetItemProvider extends + ExtendedElementTypeSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public CustomExtendedElementTypeSetItemProvider( + AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + protected void collectNewChildDescriptors( + Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + // TODO try to implement this using the extension points => this should + // be added automatically by each extension + + newChildDescriptors.add(createChildParameter( + ExtendedtypesPackage.eINSTANCE + .getExtendedElementTypeSet_ElementType(), + InvariantSemanticTypeConfigurationFactory.eINSTANCE + .createInvariantSemanticTypeConfiguration())); + + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedtypesItemProviderAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedtypesItemProviderAdapterFactory.java new file mode 100644 index 00000000000..672fa43e587 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit/src/org/eclipse/papyrus/infra/extendedtypes/provider/CustomExtendedtypesItemProviderAdapterFactory.java @@ -0,0 +1,53 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.provider; + +import org.eclipse.emf.common.notify.Adapter; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. + * + * @generated + */ +public class CustomExtendedtypesItemProviderAdapterFactory extends + ExtendedtypesItemProviderAdapterFactory { + + /** + * {@inheritDoc} + */ + @Override + public Adapter createExtendedElementTypeSetAdapter() { + if (extendedElementTypeSetItemProvider == null) { + extendedElementTypeSetItemProvider = new CustomExtendedElementTypeSetItemProvider(this); + } + + return extendedElementTypeSetItemProvider; + } + + /** + * {@inheritDoc} + */ + @Override + public Adapter createAspectSemanticTypeConfigurationAdapter() { + if(aspectSemanticTypeConfigurationItemProvider == null) { + aspectSemanticTypeConfigurationItemProvider = new CustomAspectSemanticTypeConfigurationItemProvider(this); + } + return aspectSemanticTypeConfigurationItemProvider; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.classpath b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.classpath new file mode 100644 index 00000000000..240e23bfdc0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.project b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.project new file mode 100644 index 00000000000..a389db7f315 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.extendedtypes.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..af0f20f97a5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/.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/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..314533fca0d --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.infra.extendedtypes.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + org.eclipse.papyrus.infra.extendedtypes.edit;bundle-version="1.0.0";visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.emf.edit.ui;visibility:=reexport, + org.eclipse.ui.ide;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.uml2.uml.edit;visibility:=reexport +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 1.0.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.infra.extendedtypes.presentation + .ExtendedTypesEditorPlugin$Implementation +Bundle-SymbolicName: org.eclipse.papyrus.infra.extendedtypes.editor;si + ngleton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/build.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/build.properties new file mode 100644 index 00000000000..20dcdf94a4c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/build.properties @@ -0,0 +1,20 @@ +# 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: +# CEA LIST - Initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/,\ + src/ +output.. = bin diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/AspectSemanticModelFile.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/AspectSemanticModelFile.gif new file mode 100644 index 00000000000..cc04daea0fe Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/AspectSemanticModelFile.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/ExtendedtypesModelFile.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/ExtendedtypesModelFile.gif new file mode 100644 index 00000000000..66b71ecf1b9 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/ExtendedtypesModelFile.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantHierarchyConfigurationModelFile.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantHierarchyConfigurationModelFile.gif new file mode 100644 index 00000000000..97061e34e9b Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantHierarchyConfigurationModelFile.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantSemanticTypeConfigurationModelFile.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantSemanticTypeConfigurationModelFile.gif new file mode 100644 index 00000000000..b7c1ce53490 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/obj16/InvariantSemanticTypeConfigurationModelFile.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewAspectSemantic.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewAspectSemantic.gif new file mode 100644 index 00000000000..7238879695e Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewAspectSemantic.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewExtendedtypes.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewExtendedtypes.gif new file mode 100644 index 00000000000..35743ceb88a Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewExtendedtypes.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantHierarchyConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantHierarchyConfiguration.gif new file mode 100644 index 00000000000..9c44c4935ea Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantHierarchyConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantSemanticTypeConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantSemanticTypeConfiguration.gif new file mode 100644 index 00000000000..84d170d6289 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/icons/full/wizban/NewInvariantSemanticTypeConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.properties new file mode 100644 index 00000000000..dd56d2c82c8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.properties @@ -0,0 +1,90 @@ +# 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: +# CEA LIST - Initial API and implementation + +pluginName = ExtendedTypes Editor +providerName = www.example.org + +_UI_ExtendedtypesEditor_menu = &Extendedtypes Editor + +_UI_CreateChild_menu_item = &New Child +_UI_CreateSibling_menu_item = N&ew Sibling + +_UI_ShowPropertiesView_menu_item = Show &Properties View +_UI_RefreshViewer_menu_item = &Refresh + +_UI_SelectionPage_label = Selection +_UI_ParentPage_label = Parent +_UI_ListPage_label = List +_UI_TreePage_label = Tree +_UI_TablePage_label = Table +_UI_TreeWithColumnsPage_label = Tree with Columns +_UI_ObjectColumn_label = Object +_UI_SelfColumn_label = Self + +_UI_NoObjectSelected = Selected Nothing +_UI_SingleObjectSelected = Selected Object: {0} +_UI_MultiObjectSelected = Selected {0} Objects + +_UI_OpenEditorError_label = Open Editor + +_UI_Wizard_category = Example EMF Model Creation Wizards + +_UI_CreateModelError_message = Problems encountered in file "{0}" + +_UI_ExtendedtypesModelWizard_label = Extendedtypes Model +_UI_ExtendedtypesModelWizard_description = Create a new Extendedtypes model + +_UI_ExtendedtypesEditor_label = Extendedtypes Model Editor + +_UI_ExtendedtypesEditorFilenameDefaultBase = My +_UI_ExtendedtypesEditorFilenameExtensions = extendedtypes + +_UI_Wizard_label = New + +_WARN_FilenameExtension = The file name must end in ''.{0}'' +_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} + +_UI_ModelObject = &Model Object +_UI_XMLEncoding = &XML Encoding +_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 +_UI_Wizard_initial_object_description = Select a model object to create + +_UI_FileConflict_label = File Conflict +_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? + +_UI_AspectSemanticEditor_menu = &AspectSemantic Editor + _UI_AspectSemanticModelWizard_label = AspectSemantic Model +_UI_AspectSemanticModelWizard_description = Create a new AspectSemantic model + _UI_AspectSemanticEditor_label = AspectSemantic Model Editor + _UI_AspectSemanticEditorFilenameDefaultBase = My +_UI_AspectSemanticEditorFilenameExtensions = aspectsemantic + +_UI_InvariantSemanticTypeConfigurationEditor_menu = &InvariantSemanticTypeConfiguration Editor + _UI_InvariantSemanticTypeConfigurationModelWizard_label = InvariantSemanticTypeConfiguration Model +_UI_InvariantSemanticTypeConfigurationModelWizard_description = Create a new InvariantSemanticTypeConfiguration model + _UI_InvariantSemanticTypeConfigurationEditor_label = InvariantSemanticTypeConfiguration Model Editor + _UI_InvariantSemanticTypeConfigurationEditorFilenameDefaultBase = My +_UI_InvariantSemanticTypeConfigurationEditorFilenameExtensions = invariantsemantictypeconfiguration + +_UI_InvariantHierarchyConfigurationEditor_menu = &InvariantHierarchyConfiguration Editor + _UI_InvariantHierarchyConfigurationModelWizard_label = InvariantHierarchyConfiguration Model +_UI_InvariantHierarchyConfigurationModelWizard_description = Create a new InvariantHierarchyConfiguration model + _UI_InvariantHierarchyConfigurationEditor_label = InvariantHierarchyConfiguration Model Editor + _UI_InvariantHierarchyConfigurationEditorFilenameDefaultBase = My +_UI_InvariantHierarchyConfigurationEditorFilenameExtensions = invarianthierarchyconfiguration + +_UI_InvarianthierarchyconfigurationEditor_menu = &Invarianthierarchyconfiguration Editor + _UI_InvarianthierarchyconfigurationModelWizard_label = Invarianthierarchyconfiguration Model +_UI_InvarianthierarchyconfigurationModelWizard_description = Create a new Invarianthierarchyconfiguration model + _UI_InvarianthierarchyconfigurationEditor_label = Invarianthierarchyconfiguration Model Editor + _UI_InvarianthierarchyconfigurationEditorFilenameDefaultBase = My +_UI_InvarianthierarchyconfigurationEditorFilenameExtensions = invarianthierarchyconfiguration + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.xml new file mode 100644 index 00000000000..a8c24eff582 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/plugin.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + %_UI_ExtendedtypesModelWizard_description + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedTypesEditorPlugin.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedTypesEditorPlugin.java new file mode 100644 index 00000000000..9163a15b0c9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedTypesEditorPlugin.java @@ -0,0 +1,109 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +/** + * This is the central singleton for the ExtendedTypes editor plugin. + * + * + * + * @generated + */ +public final class ExtendedTypesEditorPlugin extends EMFPlugin { + + /** + * Keep track of the singleton. + * + * + * + * @generated + */ + public static final ExtendedTypesEditorPlugin INSTANCE = new ExtendedTypesEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * + * @generated + */ + public ExtendedTypesEditorPlugin() { + super(new ResourceLocator[]{ EcoreEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + + /** + * Creates an instance. + * + * + * + * @generated + */ + public Implementation() { + super(); + // Remember the static instance. + // + plugin = this; + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesActionBarContributor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesActionBarContributor.java new file mode 100644 index 00000000000..eb790679bf8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesActionBarContributor.java @@ -0,0 +1,542 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.presentation; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Extendedtypes model editor. + * + * + * + * @generated + */ +public class ExtendedtypesActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener { + + /** + * This keeps track of the active editor. + * + * + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * + * + * @generated + */ + protected IAction showPropertiesViewAction = new Action(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) //$NON-NLS-1$ + { + + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$ + } catch (PartInitException exception) { + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * + * + * @generated + */ + protected IAction refreshViewerAction = new Action(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) //$NON-NLS-1$ + { + + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if(activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if(viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This will contain a map of {@link org.eclipse.emf.edit.ui.action.CreateChildAction}s, keyed by sub-menu text. + * + * + * + * @generated + */ + protected Map> createChildSubmenuActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * + * + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This will contain a map of {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction}s, keyed by submenu text. + * + * + * + * @generated + */ + protected Map> createSiblingSubmenuActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * + * + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * + * + * @generated + */ + public ExtendedtypesActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("extendedtypes-settings")); //$NON-NLS-1$ + toolBarManager.add(new Separator("extendedtypes-additions")); //$NON-NLS-1$ + } + + /** + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * + * + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + IMenuManager submenuManager = new MenuManager(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesEditor_menu"), "org.eclipse.papyrus.infra.extendedtypesMenuID"); //$NON-NLS-1$ //$NON-NLS-2$ + menuManager.insertAfter("additions", submenuManager); //$NON-NLS-1$ + submenuManager.add(new Separator("settings")); //$NON-NLS-1$ + submenuManager.add(new Separator("actions")); //$NON-NLS-1$ + submenuManager.add(new Separator("additions")); //$NON-NLS-1$ + submenuManager.add(new Separator("additions-end")); //$NON-NLS-1$ + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$ + submenuManager.insertBefore("additions", createChildMenuManager); //$NON-NLS-1$ + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); //$NON-NLS-1$ + submenuManager.insertBefore("additions", createSiblingMenuManager); //$NON-NLS-1$ + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener(new IMenuListener() { + + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * + * + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + // Switch to the new selection provider. + // + if(selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if(part == null) { + selectionProvider = null; + } else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + // Fake a selection changed event to update the menus. + // + if(selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * + * + * + * @generated + */ + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if(createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildSubmenuActions); + depopulateManager(createChildMenuManager, createChildActions); + } + if(createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingSubmenuActions); + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + ISelection selection = event.getSelection(); + if(selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createChildSubmenuActions = extractSubmenuActions(createChildActions); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + createSiblingSubmenuActions = extractSubmenuActions(createSiblingActions); + if(createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildSubmenuActions, null); + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if(createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingSubmenuActions, null); + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if(descriptors != null) { + for(Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if(descriptors != null) { + for(Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection, + * by inserting them before the specified contribution item contributionID. + * If contributionID is null, they are simply added. + * + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { + if(actions != null) { + for(IAction action : actions) { + if(contributionID != null) { + manager.insertBefore(contributionID, action); + } else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection. + * + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if(actions != null) { + IContributionItem[] items = manager.getItems(); + for(int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while(contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + // Delete the ActionContributionItems with matching action. + // + if(contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if(actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This extracts those actions in the submenuActions collection whose text is qualified and returns + * a map of these actions, keyed by submenu text. + * + * + * + * @generated + */ + protected Map> extractSubmenuActions(Collection createActions) { + Map> createSubmenuActions = new LinkedHashMap>(); + if(createActions != null) { + for(Iterator actions = createActions.iterator(); actions.hasNext();) { + IAction action = actions.next(); + StringTokenizer st = new StringTokenizer(action.getText(), "|"); //$NON-NLS-1$ + if(st.countTokens() == 2) { + String text = st.nextToken().trim(); + Collection submenuActions = createSubmenuActions.get(text); + if(submenuActions == null) { + createSubmenuActions.put(text, submenuActions = new ArrayList()); + } + action.setText(st.nextToken().trim()); + submenuActions.add(action); + actions.remove(); + } + } + } + return createSubmenuActions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.MenuManager}s containing + * {@link org.eclipse.jface.action.ActionContributionItem}s based on the {@link org.eclipse.jface.action.IAction}s + * contained in the submenuActions collection, by inserting them before the specified contribution + * item contributionID. + * If contributionID is null, they are simply added. + * + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Map> submenuActions, String contributionID) { + if(submenuActions != null) { + for(Map.Entry> entry : submenuActions.entrySet()) { + MenuManager submenuManager = new MenuManager(entry.getKey()); + if(contributionID != null) { + manager.insertBefore(contributionID, submenuManager); + } else { + manager.add(submenuManager); + } + populateManager(submenuManager, entry.getValue(), null); + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.MenuManager}s and their + * {@link org.eclipse.jface.action.ActionContributionItem}s based on the {@link org.eclipse.jface.action.IAction}s + * contained in the submenuActions map. + * + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Map> submenuActions) { + if(submenuActions != null) { + IContributionItem[] items = manager.getItems(); + for(int i = 0; i < items.length; i++) { + IContributionItem contributionItem = items[i]; + if(contributionItem instanceof MenuManager) { + MenuManager submenuManager = (MenuManager)contributionItem; + if(submenuActions.containsKey(submenuManager.getMenuText())) { + depopulateManager(submenuManager, submenuActions.get(contributionItem)); + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + submenuManager = new MenuManager(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$ + populateManager(submenuManager, createChildSubmenuActions, null); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$ + submenuManager = new MenuManager(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); //$NON-NLS-1$ + populateManager(submenuManager, createSiblingSubmenuActions, null); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$ + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$ + menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$ + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$ + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted objects. + * + * + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesEditor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesEditor.java new file mode 100644 index 00000000000..68f3c4e164c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesEditor.java @@ -0,0 +1,1804 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.presentation; + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; + +import org.eclipse.swt.layout.FillLayout; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import org.eclipse.papyrus.infra.extendedtypes.provider.ExtendedtypesItemProviderAdapterFactory; + +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +/** + * This is an example of a Extendedtypes model editor. + * + * + * + * @generated + */ +public class ExtendedtypesEditor extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + + /** + * This keeps track of the editing domain that is used to track all changes to the model. + * + * + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * + * + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * + * + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. + * + * + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. + * A list viewer doesn't support icons. + * + * + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. + * A table can be used as a list with icons. + * + * + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. + * + * + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. + * + * + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * + * + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * + * + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * + * + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * + * @generated + */ + protected IPartListener partListener = new IPartListener() { + + public void partActivated(IWorkbenchPart p) { + if(p instanceof ContentOutline) { + if(((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ExtendedtypesEditor.this); + setCurrentViewer(contentOutlineViewer); + } + } else if(p instanceof PropertySheet) { + if(propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ExtendedtypesEditor.this); + handleActivate(); + } + } else if(p == ExtendedtypesEditor.this) { + handleActivate(); + } + } + + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded loaded. + * + * + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = new EContentAdapter() { + + @Override + public void notifyChanged(Notification notification) { + if(notification.getNotifier() instanceof Resource) { + switch(notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: + { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if(diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } else { + resourceToDiagnosticMap.remove(resource); + } + if(updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if(updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * + * + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() { + + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + + protected Collection changedResources = new ArrayList(); + + protected Collection removedResources = new ArrayList(); + + public boolean visit(IResourceDelta delta) { + if(delta.getResource().getType() == IResource.FILE) { + if(delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if(resource != null) { + if(delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } else if(!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + if(!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if(!isDirty()) { + getSite().getPage().closeEditor(ExtendedtypesEditor.this, false); + } + } + }); + } + if(!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if(getSite().getPage().getActiveEditor() == ExtendedtypesEditor.this) { + handleActivate(); + } + } + }); + } + } catch (CoreException exception) { + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if(editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + if(!removedResources.isEmpty()) { + if(handleDirtyConflict()) { + getSite().getPage().closeEditor(ExtendedtypesEditor.this, false); + } else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } else if(!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * + * + * @generated + */ + protected void handleChangedResources() { + if(!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if(isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + updateProblemIndication = false; + for(Resource resource : changedResources) { + if(resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } catch (IOException exception) { + if(!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + if(AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the specified diagnostic. + * + * + * + * @generated + */ + protected void updateProblemIndication() { + if(updateProblemIndication) { + BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, "org.eclipse.papyrus.infra.extendedtypes.editor", //$NON-NLS-1$ + 0, null, new Object[]{ editingDomain.getResourceSet() }); + for(Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if(childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + int lastEditorPage = getPageCount() - 1; + if(lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if(diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } else if(diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } catch (PartInitException exception) { + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + } + } + if(markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if(diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } catch (CoreException exception) { + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * + * + * @generated + */ + protected boolean handleDirtyConflict() { + return MessageDialog.openQuestion(getSite().getShell(), getString("_UI_FileConflict_label"), //$NON-NLS-1$ + getString("_WARN_FileConflict")); //$NON-NLS-1$ + } + + /** + * This creates a model editor. + * + * + * + * @generated + */ + public ExtendedtypesEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ExtendedtypesItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener(new CommandStackListener() { + + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec(new Runnable() { + + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if(mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for(Iterator i = propertySheetPages.iterator(); i.hasNext();) { + PropertySheetPage propertySheetPage = i.next(); + if(propertySheetPage.getControl().isDisposed()) { + i.remove(); + } else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if(theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = new Runnable() { + + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if(currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} and for supporting + * {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * + * @generated + */ + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + + /** + * + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * + * @generated + */ + @Override + public Object[] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * + * @generated + */ + @Override + public Object[] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * + * + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if(currentViewerPane != viewerPane) { + if(currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * + * + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if(currentViewer != viewer) { + if(selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = new ISelectionChangedListener() { + + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + // Stop listening to the old one. + // + if(currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + // Start listening to the new one. + // + if(viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + // Remember it. + // + currentViewer = viewer; + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * + * + * + * @generated + */ + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * + * + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$ + contextMenu.add(new Separator("additions")); //$NON-NLS-1$ + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu = contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[]{ LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * + * + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if(diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + if(!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.infra.extendedtypes.editor", //$NON-NLS-1$ + 0, getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$ + new Object[]{ exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } else if(exception != null) { + return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.infra.extendedtypes.editor", //$NON-NLS-1$ + 0, getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$ + new Object[]{ exception }); + } else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + // Only creates the other pages if there is something that can be edited + // + if(!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), ExtendedtypesEditor.this) { + + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$ + } + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), ExtendedtypesEditor.this) { + + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$ + } + // This is the page for the list viewer + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), ExtendedtypesEditor.this) { + + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$ + } + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), ExtendedtypesEditor.this) { + + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$ + } + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), ExtendedtypesEditor.this) { + + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$ + objectColumn.setResizable(true); + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$ + selfColumn.setResizable(true); + tableViewer.setColumnProperties(new String[]{ "a", "b" }); //$NON-NLS-1$ //$NON-NLS-2$ + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$ + } + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), ExtendedtypesEditor.this) { + + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$ + objectColumn.setResizable(true); + objectColumn.setWidth(250); + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$ + selfColumn.setResizable(true); + selfColumn.setWidth(200); + treeViewerWithColumns.setColumnProperties(new String[]{ "a", "b" }); //$NON-NLS-1$ //$NON-NLS-2$ + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$ + } + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + setActivePage(0); + } + }); + } + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener(new ControlAdapter() { + + boolean guard = false; + + @Override + public void controlResized(ControlEvent event) { + if(!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * + * + * + * @generated + */ + protected void hideTabs() { + if(getPageCount() <= 1) { + setPageText(0, ""); //$NON-NLS-1$ + if(getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * + * + * + * @generated + */ + protected void showTabs() { + if(getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$ + if(getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * + * + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + if(contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if(key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } else if(key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } else if(key.equals(IGotoMarker.class)) { + return this; + } else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if(contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + if(!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + contentOutlinePage = new MyContentOutlinePage(); + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() { + + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) { + + @Override + public void setSelectionToViewer(List selection) { + ExtendedtypesEditor.this.setSelectionToViewer(selection); + ExtendedtypesEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * + * + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if(currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection)selection).iterator(); + if(selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if(currentViewerPane.getViewer() == selectionViewer) { + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while(selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } else { + // Set the input to the widget. + // + if(currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * + * + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model file. + * + * + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { + + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for(Resource resource : editingDomain.getResourceSet().getResources()) { + if((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if(resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } catch (Exception exception) { + // Something went wrong that shouldn't. + // + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * + * + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if(stream != null) { + result = true; + stream.close(); + } + } catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if(path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if(file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * + * @generated + */ + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if(!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * + * @generated + */ + @Override + public void setFocus() { + if(currentViewerPane != null) { + currentViewerPane.setFocus(); + } else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * + * @generated + */ + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * + * @generated + */ + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * + * + * + * @generated + */ + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * + * + * + * @generated + */ + public void setSelection(ISelection selection) { + editorSelection = selection; + for(ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + if(statusLineManager != null) { + if(selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection)selection).toList(); + switch(collection.size()) { + case 0: + { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$ + break; + } + case 1: + { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$ + break; + } + default: + { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); //$NON-NLS-1$ + break; + } + } + } else { + statusLineManager.setMessage(""); //$NON-NLS-1$ + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * + * + * @generated + */ + private static String getString(String key) { + return ExtendedTypesEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * + * + * @generated + */ + private static String getString(String key, Object s1) { + return ExtendedTypesEditorPlugin.INSTANCE.getString(key, new Object[]{ s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * + * + * + * @generated + */ + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } + + /** + * + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + getSite().getPage().removePartListener(partListener); + adapterFactory.dispose(); + if(getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + for(PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + if(contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesModelWizard.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesModelWizard.java new file mode 100644 index 00000000000..631d05adc09 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src-gen/org/eclipse/papyrus/infra/extendedtypes/presentation/ExtendedtypesModelWizard.java @@ -0,0 +1,636 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.presentation; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.CommonPlugin; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.eclipse.jface.dialogs.MessageDialog; + +import org.eclipse.jface.viewers.IStructuredSelection; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; + +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; + +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesFactory; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.provider.ExtendedTypesEditPlugin; + +import org.eclipse.core.runtime.Path; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; + +/** + * This is a simple wizard for creating a new model file. + * + * + * + * @generated + */ +public class ExtendedtypesModelWizard extends Wizard implements INewWizard { + + /** + * The supported extensions for created files. + * + * + * + * @generated + */ + public static final List FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesEditorFilenameExtensions").split("\\s*,\\s*"))); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * A formatted list of supported file extensions, suitable for display. + * + * + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + /** + * This caches an instance of the model package. + * + * + * + * @generated + */ + protected ExtendedtypesPackage extendedtypesPackage = ExtendedtypesPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. + * + * + * + * @generated + */ + protected ExtendedtypesFactory extendedtypesFactory = extendedtypesPackage.getExtendedtypesFactory(); + + /** + * This is the file creation page. + * + * + * + * @generated + */ + protected ExtendedtypesModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. + * + * + * + * @generated + */ + protected ExtendedtypesModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default container. + * + * + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. + * + * + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * + * + * + * @generated + */ + protected List initialObjectNames; + + /** + * This just records the information. + * + * + * + * @generated + */ + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); //$NON-NLS-1$ + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ExtendedTypesEditorPlugin.INSTANCE.getImage("full/wizban/NewExtendedtypes"))); //$NON-NLS-1$ + } + + /** + * Returns the names of the types that can be created as the root object. + * + * + * + * @generated + */ + protected Collection getInitialObjectNames() { + if(initialObjectNames == null) { + initialObjectNames = new ArrayList(); + for(EClassifier eClassifier : extendedtypesPackage.getEClassifiers()) { + if(eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if(!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } + + /** + * Create a new model. + * + * + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass)extendedtypesPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = extendedtypesFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. + * + * + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + // Do the work within an operation. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { + + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if(rootObject != null) { + resource.getContents().add(rootObject); + } + // Save the contents of the resource to the file system. + // + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } catch (Exception exception) { + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + } finally { + progressMonitor.done(); + } + } + }; + getContainer().run(false, false, operation); + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if(activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + // Open an editor on the new file. + // + try { + page.openEditor(new FileEditorInput(modelFile), workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); //$NON-NLS-1$ + return false; + } + return true; + } catch (Exception exception) { + ExtendedTypesEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. + * + * + * + * @generated + */ + public class ExtendedtypesModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + + /** + * Pass in the selection. + * + * + * + * @generated + */ + public ExtendedtypesModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. + * + * + * + * @generated + */ + @Override + protected boolean validatePage() { + if(super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if(extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; //$NON-NLS-1$ //$NON-NLS-2$ + setErrorMessage(ExtendedTypesEditorPlugin.INSTANCE.getString(key, new Object[]{ FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * + * + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. + * + * + * + * @generated + */ + public class ExtendedtypesModelWizardInitialObjectCreationPage extends WizardPage { + + /** + * + * + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated + * + * + */ + protected List encodings; + + /** + * + * + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. + * + * + * + * @generated + */ + public ExtendedtypesModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * + * + * + * @generated + */ + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ModelObject")); //$NON-NLS-1$ + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + for(String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + if(initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); //$NON-NLS-1$ + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + for(String encoding : getEncodings()) { + encodingField.add(encoding); + } + encodingField.select(0); + encodingField.addModifyListener(validator); + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * + * + * + * @generated + */ + protected ModifyListener validator = new ModifyListener() { + + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * + * + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * + * + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if(visible) { + if(initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * + * + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + for(String name : getInitialObjectNames()) { + if(getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * + * + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. + * + * + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return ExtendedTypesEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); //$NON-NLS-1$ //$NON-NLS-2$ + } catch (MissingResourceException mre) { + ExtendedTypesEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * + * + * + * @generated + */ + protected Collection getEncodings() { + if(encodings == null) { + encodings = new ArrayList(); + for(StringTokenizer stringTokenizer = new StringTokenizer(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens();) //$NON-NLS-1$ + { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. + * + * + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ExtendedtypesModelWizardNewFileCreationPage("Whatever", selection); //$NON-NLS-1$ + newFileCreationPage.setTitle(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesModelWizard_label")); //$NON-NLS-1$ + newFileCreationPage.setDescription(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesModelWizard_description")); //$NON-NLS-1$ + newFileCreationPage.setFileName(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); //$NON-NLS-1$ //$NON-NLS-2$ + addPage(newFileCreationPage); + // Try and get the resource selection to determine a current directory for the file dialog. + // + if(selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if(selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if(selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + // This gives us a directory... + // + if(selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + // Make up a unique new name here. + // + String defaultModelBaseFilename = ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesEditorFilenameDefaultBase"); //$NON-NLS-1$ + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; //$NON-NLS-1$ + for(int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; //$NON-NLS-1$ + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ExtendedtypesModelWizardInitialObjectCreationPage("Whatever2"); //$NON-NLS-1$ + initialObjectCreationPage.setTitle(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_ExtendedtypesModelWizard_label")); //$NON-NLS-1$ + initialObjectCreationPage.setDescription(ExtendedTypesEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); //$NON-NLS-1$ + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. + * + * + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java new file mode 100644 index 00000000000..8297da543d0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java @@ -0,0 +1,99 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.presentation; + +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util.InvariantContainerConfigurationAdapterFactory; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.provider.CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory; +import org.eclipse.papyrus.infra.extendedtypes.provider.CustomExtendedtypesItemProviderAdapterFactory; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.views.properties.PropertySheetPage; +import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory; + +/** + * Custom editor to support metamodel extensions + */ +public class CustomExtendedtypesEditor extends ExtendedtypesEditor { + + /** + * {@inheritDoc} + */ + @Override + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new CustomExtendedtypesItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new InvariantContainerConfigurationAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new UMLItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are + // executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to + // be the selection of the viewer with focus. + // + commandStack.addCommandStackListener(new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec(new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack) event + .getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand + .getAffectedObjects()); + } + for (Iterator i = propertySheetPages + .iterator(); i.hasNext();) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, + commandStack, new HashMap()); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.classpath b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.classpath index afb9bb46ef3..e5fbd3dd27a 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.classpath +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.classpath @@ -1,7 +1,7 @@ - + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index e4177e1b682..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Thu Mar 24 15:06:10 CET 2011 -eclipse.preferences.version=1 -encoding//model/ModifySemanticValuesActionConfiguration.ecore=UTF-8 -encoding//model/ModifySemanticValuesActionConfiguration.ecorediag=UTF-8 diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF index 29862d671e9..2934ff94f16 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF @@ -1,22 +1,32 @@ Manifest-Version: 1.0 Export-Package: org.eclipse.papyrus.infra.extendedtypes.emf, - org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration, - org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl, - org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util, - org.eclipse.papyrus.infra.extendedtypes.emf.providers + org.eclipse.papyrus.infra.extendedtypes.emf.converter, + org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration, + org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl, + org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util, + org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration, + org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl, + org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0", - org.eclipse.emf.ecore;bundle-version="2.7.0";visibility:=reexport, - org.eclipse.emf.ecore.xmi;bundle-version="2.6.0";visibility:=reexport, - org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0", + org.eclipse.emf.ecore;bundle-version="2.7.0", + org.eclipse.emf.ecore.xmi;bundle-version="2.6.0", org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0", - org.eclipse.emf.facet.infra.query;bundle-version="0.1.0", - org.eclipse.uml2.uml;bundle-version="3.2.0", + org.eclipse.uml2.uml, + org.eclipse.uml2.types, + org.eclipse.emf.edit, + org.eclipse.emf.ecore.edit, + org.eclipse.papyrus.infra.extendedtypes.edit;bundle-version="1.0.0", + org.eclipse.uml2.uml.edit, org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0", org.eclipse.ui;bundle-version="3.7.0", org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0", - org.eclipse.papyrus.infra.queries.core;bundle-version="1.0.0", org.eclipse.gmf.runtime.common.core;bundle-version="1.4.1", - org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0" + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", + org.eclipse.core.databinding;bundle-version="1.4.1", + org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0", + org.eclipse.papyrus.views.properties;bundle-version="1.0.0", + org.eclipse.papyrus.views.properties.model;bundle-version="1.0.0", + org.eclipse.papyrus.infra.constraints;bundle-version="1.0.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties index 55e52586ddc..41808c4d7e5 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties @@ -1,8 +1,15 @@ # #Mon Sep 12 09:29:52 CEST 2011 output..=bin/ -bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,about.html +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html,\ + icons/ jars.compile.order=. src.includes = about.html -source..=src-gen/,src/ +source.. = src/,\ + src-gen/ bin..=bin/ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Duration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Duration.gif new file mode 100644 index 00000000000..dac4138ca01 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Duration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_DurationInterval.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_DurationInterval.gif new file mode 100644 index 00000000000..755e4ca7a46 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_DurationInterval.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Expression.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Expression.gif new file mode 100644 index 00000000000..8ce82e3f6c7 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Expression.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_InstanceValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_InstanceValue.gif new file mode 100644 index 00000000000..fe708946d58 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_InstanceValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Interval.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Interval.gif new file mode 100644 index 00000000000..4aaad5a4cd7 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_Interval.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralBoolean.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralBoolean.gif new file mode 100644 index 00000000000..44afafd55da Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralBoolean.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralInteger.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralInteger.gif new file mode 100644 index 00000000000..f93c92d061a Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralInteger.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralNull.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralNull.gif new file mode 100644 index 00000000000..5ef9a94e8da Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralNull.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralReal.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralReal.gif new file mode 100644 index 00000000000..bbf242da6a9 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralReal.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralString.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralString.gif new file mode 100644 index 00000000000..f08356ef9bb Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralString.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralUnlimitedNatural.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralUnlimitedNatural.gif new file mode 100644 index 00000000000..37dad615792 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_LiteralUnlimitedNatural.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_OpaqueExpression.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_OpaqueExpression.gif new file mode 100644 index 00000000000..8ce82e3f6c7 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_OpaqueExpression.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_StringExpression.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_StringExpression.gif new file mode 100644 index 00000000000..4aaad5a4cd7 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_StringExpression.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeExpression.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeExpression.gif new file mode 100644 index 00000000000..33e07420851 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeExpression.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeInterval.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeInterval.gif new file mode 100644 index 00000000000..e180c4cf7ca Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateConstantValue_valueInstance_TimeInterval.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ConstantValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ConstantValue.gif new file mode 100644 index 00000000000..03366e35d0f Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ConstantValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ListValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ListValue.gif new file mode 100644 index 00000000000..8997497557c Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_ListValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_QueryExecutionValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_QueryExecutionValue.gif new file mode 100644 index 00000000000..c048169804a Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateFeatureToSet_value_QueryExecutionValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateSetValuesActionConfiguration_featuresToSet_FeatureToSet.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateSetValuesActionConfiguration_featuresToSet_FeatureToSet.gif new file mode 100644 index 00000000000..bf19516c7a4 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/ctool16/CreateSetValuesActionConfiguration_featuresToSet_FeatureToSet.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ConstantValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ConstantValue.gif new file mode 100644 index 00000000000..e4bc22dd17e Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ConstantValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/DynamicValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/DynamicValue.gif new file mode 100644 index 00000000000..ed874747401 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/DynamicValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/FeatureToSet.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/FeatureToSet.gif new file mode 100644 index 00000000000..5a9bc7514fa Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/FeatureToSet.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ListValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ListValue.gif new file mode 100644 index 00000000000..c3370c7ddd5 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/ListValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/QueryExecutionValue.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/QueryExecutionValue.gif new file mode 100644 index 00000000000..ed874747401 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/QueryExecutionValue.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/SetValuesActionConfiguration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/SetValuesActionConfiguration.gif new file mode 100644 index 00000000000..7b7c428c715 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/icons/full/obj16/SetValuesActionConfiguration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecore deleted file mode 100644 index 4333d095e5d..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecore +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecorediag deleted file mode 100644 index 52c54db4738..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.ecorediag +++ /dev/null @@ -1,286 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.genmodel deleted file mode 100644 index 53f0c6613a7..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/ModifySemanticValuesActionConfiguration.genmodel +++ /dev/null @@ -1,32 +0,0 @@ - - - ModifySemanticValuesActionConfiguration.ecore - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore new file mode 100644 index 00000000000..edba70d746e --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag new file mode 100644 index 00000000000..6ae63cd48d3 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel new file mode 100644 index 00000000000..e154c2dd670 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel @@ -0,0 +1,19 @@ + + + RuntimeValuesEditionActionConfiguration.ecore + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore new file mode 100644 index 00000000000..5c42dea3afe --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag new file mode 100644 index 00000000000..9c51a194c39 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel new file mode 100644 index 00000000000..a8786580aa0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel @@ -0,0 +1,29 @@ + + + SetValuesActionConfiguration.ecore + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.properties index db13fb43b5f..399290355b2 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.properties +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.properties @@ -6,3 +6,27 @@ pluginName = EMF ExtendedTypes Model (Incubation) providerName = Eclipse Modeling Project +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + _UI_PropertyDescriptor_description = The {0} of the {1} + _UI_SetValuesActionConfiguration_type = Set Values Action Configuration +_UI_FeatureToSet_type = Feature To Set +_UI_FeatureValue_type = Feature Value +_UI_DynamicValue_type = Dynamic Value +_UI_ConstantValue_type = Constant Value +_UI_ListValue_type = List Value +_UI_QueryExecutionValue_type = Query Execution Value +_UI_Unknown_type = Object + _UI_Unknown_datatype= Value + _UI_SetValuesActionConfiguration_featuresToSet_feature = Features To Set +_UI_FeatureToSet_featureName_feature = Feature Name +_UI_FeatureToSet_value_feature = Value +_UI_FeatureToSet_atRuntime_feature = At Runtime +_UI_ConstantValue_valueInstance_feature = Value Instance +_UI_ListValue_values_feature = Values +_UI_Unknown_feature = Unspecified + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml index 9d8c9c3ff06..afdf6d9e6df 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml @@ -1,40 +1,56 @@ - + + + + + + + + + - + + uri="http://www.eclipse.org/papyrus/infra/extendedtypes/emf/runtimevalueseditionaction/1.0" + class="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage" + genModel="model/RuntimeValuesEditionActionConfiguration.genmodel"/> + + type="runtimevalueseditionactionconfiguration" + class="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util.RuntimeValuesEditionActionConfigurationResourceFactoryImpl"/> - - - - - + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ConstantValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ConstantValue.java deleted file mode 100644 index fd3845d569d..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ConstantValue.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.uml2.uml.ValueSpecification; - -/** - * - * A representation of the model object 'Constant Value'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue#getValueInstance Value Instance}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getConstantValue() - * @model - * @generated - */ -public interface ConstantValue extends FeatureValue { - /** - * Returns the value of the 'Value Instance' containment reference. - * - *

    - * If the meaning of the 'Value Instance' containment reference isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Value Instance' containment reference. - * @see #setValueInstance(ValueSpecification) - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getConstantValue_ValueInstance() - * @model containment="true" - * @generated - */ - ValueSpecification getValueInstance(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue#getValueInstance Value Instance}' containment reference. - * - * - * @param value the new value of the 'Value Instance' containment reference. - * @see #getValueInstance() - * @generated - */ - void setValueInstance(ValueSpecification value); - -} // ConstantValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/DynamicValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/DynamicValue.java deleted file mode 100644 index ab1de224cf8..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/DynamicValue.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - - -/** - * - * A representation of the model object 'Dynamic Value'. - * - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getDynamicValue() - * @model - * @generated - */ -public interface DynamicValue extends FeatureValue { -} // DynamicValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureToSet.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureToSet.java deleted file mode 100644 index 1beda453abd..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureToSet.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Feature To Set'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getFeatureName Feature Name}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getValue Value}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getFeatureToSet() - * @model - * @generated - */ -public interface FeatureToSet extends EObject { - /** - * Returns the value of the 'Feature Name' attribute. - * - *

    - * If the meaning of the 'Feature Name' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Feature Name' attribute. - * @see #setFeatureName(String) - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getFeatureToSet_FeatureName() - * @model required="true" - * @generated - */ - String getFeatureName(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getFeatureName Feature Name}' attribute. - * - * - * @param value the new value of the 'Feature Name' attribute. - * @see #getFeatureName() - * @generated - */ - void setFeatureName(String value); - - /** - * Returns the value of the 'Value' containment reference. - * - *

    - * If the meaning of the 'Value' containment reference isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Value' containment reference. - * @see #setValue(FeatureValue) - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getFeatureToSet_Value() - * @model containment="true" required="true" - * @generated - */ - FeatureValue getValue(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getValue Value}' containment reference. - * - * - * @param value the new value of the 'Value' containment reference. - * @see #getValue() - * @generated - */ - void setValue(FeatureValue value); - -} // FeatureToSet diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureValue.java deleted file mode 100644 index f48176278bc..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/FeatureValue.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Feature Value'. - * - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getFeatureValue() - * @model abstract="true" - * @generated - */ -public interface FeatureValue extends EObject { -} // FeatureValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ListValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ListValue.java deleted file mode 100644 index fb889826620..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ListValue.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'List Value'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue#getValues Values}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getListValue() - * @model - * @generated - */ -public interface ListValue extends FeatureValue { - /** - * Returns the value of the 'Values' reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue}. - * - *

    - * If the meaning of the 'Values' reference list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Values' reference list. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getListValue_Values() - * @model - * @generated - */ - EList getValues(); - -} // ListValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfiguration.java deleted file mode 100644 index f87a0fa77fc..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfiguration.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; - -/** - * - * A representation of the model object 'Modify Semantic Values Action Configuration'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration#getFeaturesToSet Features To Set}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getModifySemanticValuesActionConfiguration() - * @model - * @generated - */ -public interface ModifySemanticValuesActionConfiguration extends PostActionConfiguration { - /** - * Returns the value of the 'Features To Set' containment reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet}. - * - *

    - * If the meaning of the 'Features To Set' containment reference list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Features To Set' containment reference list. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getModifySemanticValuesActionConfiguration_FeaturesToSet() - * @model containment="true" - * @generated - */ - EList getFeaturesToSet(); - -} // ModifySemanticValuesActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationFactory.java deleted file mode 100644 index e38f1f1692f..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationFactory.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage - * @generated - */ -public interface ModifySemanticValuesActionConfigurationFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - ModifySemanticValuesActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationFactoryImpl.init(); - - /** - * Returns a new object of class 'Modify Semantic Values Action Configuration'. - * - * - * @return a new object of class 'Modify Semantic Values Action Configuration'. - * @generated - */ - ModifySemanticValuesActionConfiguration createModifySemanticValuesActionConfiguration(); - - /** - * Returns a new object of class 'Feature To Set'. - * - * - * @return a new object of class 'Feature To Set'. - * @generated - */ - FeatureToSet createFeatureToSet(); - - /** - * Returns a new object of class 'Dynamic Value'. - * - * - * @return a new object of class 'Dynamic Value'. - * @generated - */ - DynamicValue createDynamicValue(); - - /** - * Returns a new object of class 'Constant Value'. - * - * - * @return a new object of class 'Constant Value'. - * @generated - */ - ConstantValue createConstantValue(); - - /** - * Returns a new object of class 'List Value'. - * - * - * @return a new object of class 'List Value'. - * @generated - */ - ListValue createListValue(); - - /** - * Returns a new object of class 'Query Execution Value'. - * - * - * @return a new object of class 'Query Execution Value'. - * @generated - */ - QueryExecutionValue createQueryExecutionValue(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - ModifySemanticValuesActionConfigurationPackage getModifySemanticValuesActionConfigurationPackage(); - -} //ModifySemanticValuesActionConfigurationFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationPackage.java deleted file mode 100644 index e69f4a020b0..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/ModifySemanticValuesActionConfigurationPackage.java +++ /dev/null @@ -1,548 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationFactory - * @model kind="package" - * @generated - */ -public interface ModifySemanticValuesActionConfigurationPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "modifysemanticvaluesactionconfiguration"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.eclipse.org/papyrus/diagram/types/modifysemanticvaluesactionconfiguration/0.8"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "modifysemanticvaluesactionconfiguration"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - ModifySemanticValuesActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationImpl Modify Semantic Values Action Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getModifySemanticValuesActionConfiguration() - * @generated - */ - int MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION = 0; - - /** - * The feature id for the 'Label' attribute. - * - * - * @generated - * @ordered - */ - int MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__LABEL = ExtendedtypesPackage.POST_ACTION_CONFIGURATION__LABEL; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__ID = ExtendedtypesPackage.POST_ACTION_CONFIGURATION__ID; - - /** - * The feature id for the 'Features To Set' containment reference list. - * - * - * @generated - * @ordered - */ - int MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET = ExtendedtypesPackage.POST_ACTION_CONFIGURATION_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Modify Semantic Values Action Configuration' class. - * - * - * @generated - * @ordered - */ - int MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.POST_ACTION_CONFIGURATION_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureToSetImpl Feature To Set}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureToSetImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getFeatureToSet() - * @generated - */ - int FEATURE_TO_SET = 1; - - /** - * The feature id for the 'Feature Name' attribute. - * - * - * @generated - * @ordered - */ - int FEATURE_TO_SET__FEATURE_NAME = 0; - - /** - * The feature id for the 'Value' containment reference. - * - * - * @generated - * @ordered - */ - int FEATURE_TO_SET__VALUE = 1; - - /** - * The number of structural features of the 'Feature To Set' class. - * - * - * @generated - * @ordered - */ - int FEATURE_TO_SET_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureValueImpl Feature Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getFeatureValue() - * @generated - */ - int FEATURE_VALUE = 2; - - /** - * The number of structural features of the 'Feature Value' class. - * - * - * @generated - * @ordered - */ - int FEATURE_VALUE_FEATURE_COUNT = 0; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.DynamicValueImpl Dynamic Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.DynamicValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getDynamicValue() - * @generated - */ - int DYNAMIC_VALUE = 3; - - /** - * The number of structural features of the 'Dynamic Value' class. - * - * - * @generated - * @ordered - */ - int DYNAMIC_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ConstantValueImpl Constant Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ConstantValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getConstantValue() - * @generated - */ - int CONSTANT_VALUE = 4; - - /** - * The feature id for the 'Value Instance' containment reference. - * - * - * @generated - * @ordered - */ - int CONSTANT_VALUE__VALUE_INSTANCE = FEATURE_VALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Constant Value' class. - * - * - * @generated - * @ordered - */ - int CONSTANT_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ListValueImpl List Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ListValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getListValue() - * @generated - */ - int LIST_VALUE = 5; - - /** - * The feature id for the 'Values' reference list. - * - * - * @generated - * @ordered - */ - int LIST_VALUE__VALUES = FEATURE_VALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'List Value' class. - * - * - * @generated - * @ordered - */ - int LIST_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.QueryExecutionValueImpl Query Execution Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.QueryExecutionValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getQueryExecutionValue() - * @generated - */ - int QUERY_EXECUTION_VALUE = 6; - - /** - * The feature id for the 'Configuration' reference. - * - * - * @generated - * @ordered - */ - int QUERY_EXECUTION_VALUE__CONFIGURATION = FEATURE_VALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Query Execution Value' class. - * - * - * @generated - * @ordered - */ - int QUERY_EXECUTION_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; - - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration Modify Semantic Values Action Configuration}'. - * - * - * @return the meta object for class 'Modify Semantic Values Action Configuration'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration - * @generated - */ - EClass getModifySemanticValuesActionConfiguration(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration#getFeaturesToSet Features To Set}'. - * - * - * @return the meta object for the containment reference list 'Features To Set'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration#getFeaturesToSet() - * @see #getModifySemanticValuesActionConfiguration() - * @generated - */ - EReference getModifySemanticValuesActionConfiguration_FeaturesToSet(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet Feature To Set}'. - * - * - * @return the meta object for class 'Feature To Set'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet - * @generated - */ - EClass getFeatureToSet(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getFeatureName Feature Name}'. - * - * - * @return the meta object for the attribute 'Feature Name'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getFeatureName() - * @see #getFeatureToSet() - * @generated - */ - EAttribute getFeatureToSet_FeatureName(); - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getValue Value}'. - * - * - * @return the meta object for the containment reference 'Value'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet#getValue() - * @see #getFeatureToSet() - * @generated - */ - EReference getFeatureToSet_Value(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue Feature Value}'. - * - * - * @return the meta object for class 'Feature Value'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue - * @generated - */ - EClass getFeatureValue(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.DynamicValue Dynamic Value}'. - * - * - * @return the meta object for class 'Dynamic Value'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.DynamicValue - * @generated - */ - EClass getDynamicValue(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue Constant Value}'. - * - * - * @return the meta object for class 'Constant Value'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue - * @generated - */ - EClass getConstantValue(); - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue#getValueInstance Value Instance}'. - * - * - * @return the meta object for the containment reference 'Value Instance'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue#getValueInstance() - * @see #getConstantValue() - * @generated - */ - EReference getConstantValue_ValueInstance(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue List Value}'. - * - * - * @return the meta object for class 'List Value'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue - * @generated - */ - EClass getListValue(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue#getValues Values}'. - * - * - * @return the meta object for the reference list 'Values'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue#getValues() - * @see #getListValue() - * @generated - */ - EReference getListValue_Values(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue Query Execution Value}'. - * - * - * @return the meta object for class 'Query Execution Value'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue - * @generated - */ - EClass getQueryExecutionValue(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue#getConfiguration Configuration}'. - * - * - * @return the meta object for the reference 'Configuration'. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue#getConfiguration() - * @see #getQueryExecutionValue() - * @generated - */ - EReference getQueryExecutionValue_Configuration(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - ModifySemanticValuesActionConfigurationFactory getModifySemanticValuesActionConfigurationFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationImpl Modify Semantic Values Action Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getModifySemanticValuesActionConfiguration() - * @generated - */ - EClass MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION = eINSTANCE.getModifySemanticValuesActionConfiguration(); - - /** - * The meta object literal for the 'Features To Set' containment reference list feature. - * - * - * @generated - */ - EReference MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET = eINSTANCE.getModifySemanticValuesActionConfiguration_FeaturesToSet(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureToSetImpl Feature To Set}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureToSetImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getFeatureToSet() - * @generated - */ - EClass FEATURE_TO_SET = eINSTANCE.getFeatureToSet(); - - /** - * The meta object literal for the 'Feature Name' attribute feature. - * - * - * @generated - */ - EAttribute FEATURE_TO_SET__FEATURE_NAME = eINSTANCE.getFeatureToSet_FeatureName(); - - /** - * The meta object literal for the 'Value' containment reference feature. - * - * - * @generated - */ - EReference FEATURE_TO_SET__VALUE = eINSTANCE.getFeatureToSet_Value(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureValueImpl Feature Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getFeatureValue() - * @generated - */ - EClass FEATURE_VALUE = eINSTANCE.getFeatureValue(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.DynamicValueImpl Dynamic Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.DynamicValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getDynamicValue() - * @generated - */ - EClass DYNAMIC_VALUE = eINSTANCE.getDynamicValue(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ConstantValueImpl Constant Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ConstantValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getConstantValue() - * @generated - */ - EClass CONSTANT_VALUE = eINSTANCE.getConstantValue(); - - /** - * The meta object literal for the 'Value Instance' containment reference feature. - * - * - * @generated - */ - EReference CONSTANT_VALUE__VALUE_INSTANCE = eINSTANCE.getConstantValue_ValueInstance(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ListValueImpl List Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ListValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getListValue() - * @generated - */ - EClass LIST_VALUE = eINSTANCE.getListValue(); - - /** - * The meta object literal for the 'Values' reference list feature. - * - * - * @generated - */ - EReference LIST_VALUE__VALUES = eINSTANCE.getListValue_Values(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.QueryExecutionValueImpl Query Execution Value}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.QueryExecutionValueImpl - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationPackageImpl#getQueryExecutionValue() - * @generated - */ - EClass QUERY_EXECUTION_VALUE = eINSTANCE.getQueryExecutionValue(); - - /** - * The meta object literal for the 'Configuration' reference feature. - * - * - * @generated - */ - EReference QUERY_EXECUTION_VALUE__CONFIGURATION = eINSTANCE.getQueryExecutionValue_Configuration(); - - } - -} //ModifySemanticValuesActionConfigurationPackage diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/QueryExecutionValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/QueryExecutionValue.java deleted file mode 100644 index 60c3ee93a61..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/QueryExecutionValue.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration; - -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * - * A representation of the model object 'Query Execution Value'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue#getConfiguration Configuration}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getQueryExecutionValue() - * @model - * @generated - */ -public interface QueryExecutionValue extends FeatureValue { - /** - * Returns the value of the 'Configuration' reference. - * - *

    - * If the meaning of the 'Configuration' reference isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Configuration' reference. - * @see #setConfiguration(QueryConfiguration) - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#getQueryExecutionValue_Configuration() - * @model - * @generated - */ - QueryConfiguration getConfiguration(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue#getConfiguration Configuration}' reference. - * - * - * @param value the new value of the 'Configuration' reference. - * @see #getConfiguration() - * @generated - */ - void setConfiguration(QueryConfiguration value); - -} // QueryExecutionValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ConstantValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ConstantValueImpl.java deleted file mode 100644 index b6c6683c8fc..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ConstantValueImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; - -import org.eclipse.uml2.uml.ValueSpecification; - -/** - * - * An implementation of the model object 'Constant Value'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ConstantValueImpl#getValueInstance Value Instance}
    • - *
    - *

    - * - * @generated - */ -public class ConstantValueImpl extends FeatureValueImpl implements ConstantValue { - /** - * The cached value of the '{@link #getValueInstance() Value Instance}' containment reference. - * - * - * @see #getValueInstance() - * @generated - * @ordered - */ - protected ValueSpecification valueInstance; - - /** - * - * - * @generated - */ - protected ConstantValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.CONSTANT_VALUE; - } - - /** - * - * - * @generated - */ - public ValueSpecification getValueInstance() { - return valueInstance; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetValueInstance(ValueSpecification newValueInstance, NotificationChain msgs) { - ValueSpecification oldValueInstance = valueInstance; - valueInstance = newValueInstance; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, oldValueInstance, newValueInstance); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setValueInstance(ValueSpecification newValueInstance) { - if (newValueInstance != valueInstance) { - NotificationChain msgs = null; - if (valueInstance != null) - msgs = ((InternalEObject)valueInstance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, null, msgs); - if (newValueInstance != null) - msgs = ((InternalEObject)newValueInstance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, null, msgs); - msgs = basicSetValueInstance(newValueInstance, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, newValueInstance, newValueInstance)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: - return basicSetValueInstance(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: - return getValueInstance(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: - setValueInstance((ValueSpecification)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: - setValueInstance((ValueSpecification)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: - return valueInstance != null; - } - return super.eIsSet(featureID); - } - -} //ConstantValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/DynamicValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/DynamicValueImpl.java deleted file mode 100644 index 947f33547e8..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/DynamicValueImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.DynamicValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; - -/** - * - * An implementation of the model object 'Dynamic Value'. - * - *

    - *

    - * - * @generated - */ -public class DynamicValueImpl extends FeatureValueImpl implements DynamicValue { - /** - * - * - * @generated - */ - protected DynamicValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.DYNAMIC_VALUE; - } - -} //DynamicValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureToSetImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureToSetImpl.java deleted file mode 100644 index 5a91323c5b6..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureToSetImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; - -/** - * - * An implementation of the model object 'Feature To Set'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureToSetImpl#getFeatureName Feature Name}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.FeatureToSetImpl#getValue Value}
    • - *
    - *

    - * - * @generated - */ -public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet { - /** - * The default value of the '{@link #getFeatureName() Feature Name}' attribute. - * - * - * @see #getFeatureName() - * @generated - * @ordered - */ - protected static final String FEATURE_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getFeatureName() Feature Name}' attribute. - * - * - * @see #getFeatureName() - * @generated - * @ordered - */ - protected String featureName = FEATURE_NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getValue() Value}' containment reference. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected FeatureValue value; - - /** - * - * - * @generated - */ - protected FeatureToSetImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.FEATURE_TO_SET; - } - - /** - * - * - * @generated - */ - public String getFeatureName() { - return featureName; - } - - /** - * - * - * @generated - */ - public void setFeatureName(String newFeatureName) { - String oldFeatureName = featureName; - featureName = newFeatureName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME, oldFeatureName, featureName)); - } - - /** - * - * - * @generated - */ - public FeatureValue getValue() { - return value; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetValue(FeatureValue newValue, NotificationChain msgs) { - FeatureValue oldValue = value; - value = newValue; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, oldValue, newValue); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setValue(FeatureValue newValue) { - if (newValue != value) { - NotificationChain msgs = null; - if (value != null) - msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); - if (newValue != null) - msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); - msgs = basicSetValue(newValue, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, newValue, newValue)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: - return basicSetValue(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: - return getFeatureName(); - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: - return getValue(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: - setFeatureName((String)newValue); - return; - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: - setValue((FeatureValue)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: - setFeatureName(FEATURE_NAME_EDEFAULT); - return; - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: - setValue((FeatureValue)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: - return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName); - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: - return value != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (featureName: "); - result.append(featureName); - result.append(')'); - return result.toString(); - } - -} //FeatureToSetImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureValueImpl.java deleted file mode 100644 index 14f25be6e05..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/FeatureValueImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; - -/** - * - * An implementation of the model object 'Feature Value'. - * - *

    - *

    - * - * @generated - */ -public abstract class FeatureValueImpl extends EObjectImpl implements FeatureValue { - /** - * - * - * @generated - */ - protected FeatureValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.FEATURE_VALUE; - } - -} //FeatureValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ListValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ListValueImpl.java deleted file mode 100644 index 87d157f600b..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ListValueImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.util.EObjectResolvingEList; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; - -/** - * - * An implementation of the model object 'List Value'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ListValueImpl#getValues Values}
    • - *
    - *

    - * - * @generated - */ -public class ListValueImpl extends FeatureValueImpl implements ListValue { - /** - * The cached value of the '{@link #getValues() Values}' reference list. - * - * - * @see #getValues() - * @generated - * @ordered - */ - protected EList values; - - /** - * - * - * @generated - */ - protected ListValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.LIST_VALUE; - } - - /** - * - * - * @generated - */ - public EList getValues() { - if (values == null) { - values = new EObjectResolvingEList(FeatureValue.class, this, ModifySemanticValuesActionConfigurationPackage.LIST_VALUE__VALUES); - } - return values; - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.LIST_VALUE__VALUES: - return getValues(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.LIST_VALUE__VALUES: - getValues().clear(); - getValues().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.LIST_VALUE__VALUES: - getValues().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.LIST_VALUE__VALUES: - return values != null && !values.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ListValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationFactoryImpl.java deleted file mode 100644 index 0428ac0a226..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationFactoryImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.*; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class ModifySemanticValuesActionConfigurationFactoryImpl extends EFactoryImpl implements ModifySemanticValuesActionConfigurationFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static ModifySemanticValuesActionConfigurationFactory init() { - try { - ModifySemanticValuesActionConfigurationFactory theModifySemanticValuesActionConfigurationFactory = (ModifySemanticValuesActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/diagram/types/modifysemanticvaluesactionconfiguration/0.8"); - if (theModifySemanticValuesActionConfigurationFactory != null) { - return theModifySemanticValuesActionConfigurationFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ModifySemanticValuesActionConfigurationFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION: return createModifySemanticValuesActionConfiguration(); - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET: return createFeatureToSet(); - case ModifySemanticValuesActionConfigurationPackage.DYNAMIC_VALUE: return createDynamicValue(); - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE: return createConstantValue(); - case ModifySemanticValuesActionConfigurationPackage.LIST_VALUE: return createListValue(); - case ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE: return createQueryExecutionValue(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public ModifySemanticValuesActionConfiguration createModifySemanticValuesActionConfiguration() { - ModifySemanticValuesActionConfigurationImpl modifySemanticValuesActionConfiguration = new ModifySemanticValuesActionConfigurationImpl(); - return modifySemanticValuesActionConfiguration; - } - - /** - * - * - * @generated - */ - public FeatureToSet createFeatureToSet() { - FeatureToSetImpl featureToSet = new FeatureToSetImpl(); - return featureToSet; - } - - /** - * - * - * @generated - */ - public DynamicValue createDynamicValue() { - DynamicValueImpl dynamicValue = new DynamicValueImpl(); - return dynamicValue; - } - - /** - * - * - * @generated - */ - public ConstantValue createConstantValue() { - ConstantValueImpl constantValue = new ConstantValueImpl(); - return constantValue; - } - - /** - * - * - * @generated - */ - public ListValue createListValue() { - ListValueImpl listValue = new ListValueImpl(); - return listValue; - } - - /** - * - * - * @generated - */ - public QueryExecutionValue createQueryExecutionValue() { - QueryExecutionValueImpl queryExecutionValue = new QueryExecutionValueImpl(); - return queryExecutionValue; - } - - /** - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationPackage getModifySemanticValuesActionConfigurationPackage() { - return (ModifySemanticValuesActionConfigurationPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static ModifySemanticValuesActionConfigurationPackage getPackage() { - return ModifySemanticValuesActionConfigurationPackage.eINSTANCE; - } - -} //ModifySemanticValuesActionConfigurationFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationImpl.java deleted file mode 100644 index 0fca96c3f37..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; -import org.eclipse.papyrus.infra.extendedtypes.impl.PostActionConfigurationImpl; - -/** - * - * An implementation of the model object 'Modify Semantic Values Action Configuration'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.ModifySemanticValuesActionConfigurationImpl#getFeaturesToSet Features To Set}
    • - *
    - *

    - * - * @generated - */ -public class ModifySemanticValuesActionConfigurationImpl extends PostActionConfigurationImpl implements ModifySemanticValuesActionConfiguration { - /** - * The cached value of the '{@link #getFeaturesToSet() Features To Set}' containment reference list. - * - * - * @see #getFeaturesToSet() - * @generated - * @ordered - */ - protected EList featuresToSet; - - /** - * - * - * @generated - */ - protected ModifySemanticValuesActionConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION; - } - - /** - * - * - * @generated - */ - public EList getFeaturesToSet() { - if (featuresToSet == null) { - featuresToSet = new EObjectContainmentEList(FeatureToSet.class, this, ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET); - } - return featuresToSet; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: - return ((InternalEList)getFeaturesToSet()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: - return getFeaturesToSet(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: - getFeaturesToSet().clear(); - getFeaturesToSet().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: - getFeaturesToSet().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: - return featuresToSet != null && !featuresToSet.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ModifySemanticValuesActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationPackageImpl.java deleted file mode 100644 index ebb557aab5b..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/ModifySemanticValuesActionConfigurationPackageImpl.java +++ /dev/null @@ -1,384 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - - - -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.DynamicValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationFactory; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; - -import org.eclipse.uml2.uml.UMLPackage; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class ModifySemanticValuesActionConfigurationPackageImpl extends EPackageImpl implements ModifySemanticValuesActionConfigurationPackage { - /** - * - * - * @generated - */ - private EClass modifySemanticValuesActionConfigurationEClass = null; - - /** - * - * - * @generated - */ - private EClass featureToSetEClass = null; - - /** - * - * - * @generated - */ - private EClass featureValueEClass = null; - - /** - * - * - * @generated - */ - private EClass dynamicValueEClass = null; - - /** - * - * - * @generated - */ - private EClass constantValueEClass = null; - - /** - * - * - * @generated - */ - private EClass listValueEClass = null; - - /** - * - * - * @generated - */ - private EClass queryExecutionValueEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

    Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage#eNS_URI - * @see #init() - * @generated - */ - private ModifySemanticValuesActionConfigurationPackageImpl() { - super(eNS_URI, ModifySemanticValuesActionConfigurationFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

    This method is used to initialize {@link ModifySemanticValuesActionConfigurationPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static ModifySemanticValuesActionConfigurationPackage init() { - if (isInited) return (ModifySemanticValuesActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ModifySemanticValuesActionConfigurationPackage.eNS_URI); - - // Obtain or create and register package - ModifySemanticValuesActionConfigurationPackageImpl theModifySemanticValuesActionConfigurationPackage = (ModifySemanticValuesActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ModifySemanticValuesActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ModifySemanticValuesActionConfigurationPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - ExtendedtypesPackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theModifySemanticValuesActionConfigurationPackage.createPackageContents(); - - // Initialize created meta-data - theModifySemanticValuesActionConfigurationPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theModifySemanticValuesActionConfigurationPackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ModifySemanticValuesActionConfigurationPackage.eNS_URI, theModifySemanticValuesActionConfigurationPackage); - return theModifySemanticValuesActionConfigurationPackage; - } - - /** - * - * - * @generated - */ - public EClass getModifySemanticValuesActionConfiguration() { - return modifySemanticValuesActionConfigurationEClass; - } - - /** - * - * - * @generated - */ - public EReference getModifySemanticValuesActionConfiguration_FeaturesToSet() { - return (EReference)modifySemanticValuesActionConfigurationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getFeatureToSet() { - return featureToSetEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getFeatureToSet_FeatureName() { - return (EAttribute)featureToSetEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getFeatureToSet_Value() { - return (EReference)featureToSetEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getFeatureValue() { - return featureValueEClass; - } - - /** - * - * - * @generated - */ - public EClass getDynamicValue() { - return dynamicValueEClass; - } - - /** - * - * - * @generated - */ - public EClass getConstantValue() { - return constantValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getConstantValue_ValueInstance() { - return (EReference)constantValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getListValue() { - return listValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getListValue_Values() { - return (EReference)listValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getQueryExecutionValue() { - return queryExecutionValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getQueryExecutionValue_Configuration() { - return (EReference)queryExecutionValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationFactory getModifySemanticValuesActionConfigurationFactory() { - return (ModifySemanticValuesActionConfigurationFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - modifySemanticValuesActionConfigurationEClass = createEClass(MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION); - createEReference(modifySemanticValuesActionConfigurationEClass, MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET); - - featureToSetEClass = createEClass(FEATURE_TO_SET); - createEAttribute(featureToSetEClass, FEATURE_TO_SET__FEATURE_NAME); - createEReference(featureToSetEClass, FEATURE_TO_SET__VALUE); - - featureValueEClass = createEClass(FEATURE_VALUE); - - dynamicValueEClass = createEClass(DYNAMIC_VALUE); - - constantValueEClass = createEClass(CONSTANT_VALUE); - createEReference(constantValueEClass, CONSTANT_VALUE__VALUE_INSTANCE); - - listValueEClass = createEClass(LIST_VALUE); - createEReference(listValueEClass, LIST_VALUE__VALUES); - - queryExecutionValueEClass = createEClass(QUERY_EXECUTION_VALUE); - createEReference(queryExecutionValueEClass, QUERY_EXECUTION_VALUE__CONFIGURATION); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); - EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); - ConfigurationPackage theConfigurationPackage = (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - modifySemanticValuesActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getPostActionConfiguration()); - dynamicValueEClass.getESuperTypes().add(this.getFeatureValue()); - constantValueEClass.getESuperTypes().add(this.getFeatureValue()); - listValueEClass.getESuperTypes().add(this.getFeatureValue()); - queryExecutionValueEClass.getESuperTypes().add(this.getFeatureValue()); - - // Initialize classes and features; add operations and parameters - initEClass(modifySemanticValuesActionConfigurationEClass, ModifySemanticValuesActionConfiguration.class, "ModifySemanticValuesActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getModifySemanticValuesActionConfiguration_FeaturesToSet(), this.getFeatureToSet(), null, "featuresToSet", null, 0, -1, ModifySemanticValuesActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(featureToSetEClass, FeatureToSet.class, "FeatureToSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getFeatureToSet_FeatureName(), theEcorePackage.getEString(), "featureName", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getFeatureToSet_Value(), this.getFeatureValue(), null, "value", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(featureValueEClass, FeatureValue.class, "FeatureValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(dynamicValueEClass, DynamicValue.class, "DynamicValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(constantValueEClass, ConstantValue.class, "ConstantValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getConstantValue_ValueInstance(), theUMLPackage.getValueSpecification(), null, "valueInstance", null, 0, 1, ConstantValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(listValueEClass, ListValue.class, "ListValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getListValue_Values(), this.getFeatureValue(), null, "values", null, 0, -1, ListValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(queryExecutionValueEClass, QueryExecutionValue.class, "QueryExecutionValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getQueryExecutionValue_Configuration(), theConfigurationPackage.getQueryConfiguration(), null, "configuration", null, 0, 1, QueryExecutionValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - } - -} //ModifySemanticValuesActionConfigurationPackageImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/QueryExecutionValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/QueryExecutionValueImpl.java deleted file mode 100644 index 483568aa46e..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/impl/QueryExecutionValueImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * - * An implementation of the model object 'Query Execution Value'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.impl.QueryExecutionValueImpl#getConfiguration Configuration}
    • - *
    - *

    - * - * @generated - */ -public class QueryExecutionValueImpl extends FeatureValueImpl implements QueryExecutionValue { - /** - * The cached value of the '{@link #getConfiguration() Configuration}' reference. - * - * - * @see #getConfiguration() - * @generated - * @ordered - */ - protected QueryConfiguration configuration; - - /** - * - * - * @generated - */ - protected QueryExecutionValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ModifySemanticValuesActionConfigurationPackage.Literals.QUERY_EXECUTION_VALUE; - } - - /** - * - * - * @generated - */ - public QueryConfiguration getConfiguration() { - if (configuration != null && configuration.eIsProxy()) { - InternalEObject oldConfiguration = (InternalEObject)configuration; - configuration = (QueryConfiguration)eResolveProxy(oldConfiguration); - if (configuration != oldConfiguration) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION, oldConfiguration, configuration)); - } - } - return configuration; - } - - /** - * - * - * @generated - */ - public QueryConfiguration basicGetConfiguration() { - return configuration; - } - - /** - * - * - * @generated - */ - public void setConfiguration(QueryConfiguration newConfiguration) { - QueryConfiguration oldConfiguration = configuration; - configuration = newConfiguration; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION, oldConfiguration, configuration)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - if (resolve) return getConfiguration(); - return basicGetConfiguration(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - setConfiguration((QueryConfiguration)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - setConfiguration((QueryConfiguration)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - return configuration != null; - } - return super.eIsSet(featureID); - } - -} //QueryExecutionValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationAdapterFactory.java deleted file mode 100644 index 3ae79b3d992..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationAdapterFactory.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - -import org.eclipse.emf.ecore.EObject; - - -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.*; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage - * @generated - */ -public class ModifySemanticValuesActionConfigurationAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static ModifySemanticValuesActionConfigurationPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationAdapterFactory() { - if (modelPackage == null) { - modelPackage = ModifySemanticValuesActionConfigurationPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * - * @generated - */ - protected ModifySemanticValuesActionConfigurationSwitch modelSwitch = - new ModifySemanticValuesActionConfigurationSwitch() { - @Override - public Adapter caseModifySemanticValuesActionConfiguration(ModifySemanticValuesActionConfiguration object) { - return createModifySemanticValuesActionConfigurationAdapter(); - } - @Override - public Adapter caseFeatureToSet(FeatureToSet object) { - return createFeatureToSetAdapter(); - } - @Override - public Adapter caseFeatureValue(FeatureValue object) { - return createFeatureValueAdapter(); - } - @Override - public Adapter caseDynamicValue(DynamicValue object) { - return createDynamicValueAdapter(); - } - @Override - public Adapter caseConstantValue(ConstantValue object) { - return createConstantValueAdapter(); - } - @Override - public Adapter caseListValue(ListValue object) { - return createListValueAdapter(); - } - @Override - public Adapter caseQueryExecutionValue(QueryExecutionValue object) { - return createQueryExecutionValueAdapter(); - } - @Override - public Adapter caseActionConfiguration(ActionConfiguration object) { - return createActionConfigurationAdapter(); - } - @Override - public Adapter casePostActionConfiguration(PostActionConfiguration object) { - return createPostActionConfigurationAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration Modify Semantic Values Action Configuration}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration - * @generated - */ - public Adapter createModifySemanticValuesActionConfigurationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet Feature To Set}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet - * @generated - */ - public Adapter createFeatureToSetAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue Feature Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue - * @generated - */ - public Adapter createFeatureValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.DynamicValue Dynamic Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.DynamicValue - * @generated - */ - public Adapter createDynamicValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue Constant Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue - * @generated - */ - public Adapter createConstantValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue List Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue - * @generated - */ - public Adapter createListValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue Query Execution Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue - * @generated - */ - public Adapter createQueryExecutionValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration - * @generated - */ - public Adapter createActionConfigurationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration Post Action Configuration}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration - * @generated - */ - public Adapter createPostActionConfigurationAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //ModifySemanticValuesActionConfigurationAdapterFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceFactoryImpl.java deleted file mode 100644 index 91222121e14..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceFactoryImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util; - -import org.eclipse.emf.common.util.URI; - -import org.eclipse.emf.ecore.resource.Resource; - -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; - -import org.eclipse.emf.ecore.xmi.XMLResource; - -/** - * - * The Resource Factory associated with the package. - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util.ModifySemanticValuesActionConfigurationResourceImpl - * @generated - */ -public class ModifySemanticValuesActionConfigurationResourceFactoryImpl extends ResourceFactoryImpl { - /** - * Creates an instance of the resource factory. - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationResourceFactoryImpl() { - super(); - } - - /** - * Creates an instance of the resource. - * - * - * @generated - */ - @Override - public Resource createResource(URI uri) { - XMLResource result = new ModifySemanticValuesActionConfigurationResourceImpl(uri); - result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - - result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); - return result; - } - -} //ModifySemanticValuesActionConfigurationResourceFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceImpl.java deleted file mode 100644 index 1e8ff788b37..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationResourceImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util; - -import org.eclipse.emf.common.util.URI; - -import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; - -/** - * - * The Resource associated with the package. - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util.ModifySemanticValuesActionConfigurationResourceFactoryImpl - * @generated - */ -public class ModifySemanticValuesActionConfigurationResourceImpl extends XMLResourceImpl { - /** - * Creates an instance of the resource. - * - * - * @param uri the URI of the new resource. - * @generated - */ - public ModifySemanticValuesActionConfigurationResourceImpl(URI uri) { - super(uri); - } - -} //ModifySemanticValuesActionConfigurationResourceImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationSwitch.java deleted file mode 100644 index ccc9aa955f5..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationSwitch.java +++ /dev/null @@ -1,279 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - - -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.*; - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage - * @generated - */ -public class ModifySemanticValuesActionConfigurationSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static ModifySemanticValuesActionConfigurationPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationSwitch() { - if (modelPackage == null) { - modelPackage = ModifySemanticValuesActionConfigurationPackage.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * - * - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ModifySemanticValuesActionConfigurationPackage.MODIFY_SEMANTIC_VALUES_ACTION_CONFIGURATION: { - ModifySemanticValuesActionConfiguration modifySemanticValuesActionConfiguration = (ModifySemanticValuesActionConfiguration)theEObject; - T result = caseModifySemanticValuesActionConfiguration(modifySemanticValuesActionConfiguration); - if (result == null) result = casePostActionConfiguration(modifySemanticValuesActionConfiguration); - if (result == null) result = caseActionConfiguration(modifySemanticValuesActionConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ModifySemanticValuesActionConfigurationPackage.FEATURE_TO_SET: { - FeatureToSet featureToSet = (FeatureToSet)theEObject; - T result = caseFeatureToSet(featureToSet); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ModifySemanticValuesActionConfigurationPackage.FEATURE_VALUE: { - FeatureValue featureValue = (FeatureValue)theEObject; - T result = caseFeatureValue(featureValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ModifySemanticValuesActionConfigurationPackage.DYNAMIC_VALUE: { - DynamicValue dynamicValue = (DynamicValue)theEObject; - T result = caseDynamicValue(dynamicValue); - if (result == null) result = caseFeatureValue(dynamicValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ModifySemanticValuesActionConfigurationPackage.CONSTANT_VALUE: { - ConstantValue constantValue = (ConstantValue)theEObject; - T result = caseConstantValue(constantValue); - if (result == null) result = caseFeatureValue(constantValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ModifySemanticValuesActionConfigurationPackage.LIST_VALUE: { - ListValue listValue = (ListValue)theEObject; - T result = caseListValue(listValue); - if (result == null) result = caseFeatureValue(listValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ModifySemanticValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE: { - QueryExecutionValue queryExecutionValue = (QueryExecutionValue)theEObject; - T result = caseQueryExecutionValue(queryExecutionValue); - if (result == null) result = caseFeatureValue(queryExecutionValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Modify Semantic Values Action Configuration'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Modify Semantic Values Action Configuration'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModifySemanticValuesActionConfiguration(ModifySemanticValuesActionConfiguration object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Feature To Set'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Feature To Set'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseFeatureToSet(FeatureToSet object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Feature Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Feature Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseFeatureValue(FeatureValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Dynamic Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Dynamic Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseDynamicValue(DynamicValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Constant Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Constant Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseConstantValue(ConstantValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'List Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'List Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseListValue(ListValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Query Execution Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Query Execution Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseQueryExecutionValue(QueryExecutionValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Action Configuration'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Action Configuration'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseActionConfiguration(ActionConfiguration object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Post Action Configuration'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Post Action Configuration'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePostActionConfiguration(PostActionConfiguration object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //ModifySemanticValuesActionConfigurationSwitch diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationXMLProcessor.java deleted file mode 100644 index 75cf9df4e82..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/modifysemanticvaluesactionconfiguration/util/ModifySemanticValuesActionConfigurationXMLProcessor.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util; - -import java.util.Map; - -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.resource.Resource; - -import org.eclipse.emf.ecore.xmi.util.XMLProcessor; - -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfigurationPackage; - -/** - * This class contains helper methods to serialize and deserialize XML documents - * - * - * @generated - */ -public class ModifySemanticValuesActionConfigurationXMLProcessor extends XMLProcessor { - - /** - * Public constructor to instantiate the helper. - * - * - * @generated - */ - public ModifySemanticValuesActionConfigurationXMLProcessor() { - super((EPackage.Registry.INSTANCE)); - ModifySemanticValuesActionConfigurationPackage.eINSTANCE.eClass(); - } - - /** - * Register for "*" and "xml" file extensions the ModifySemanticValuesActionConfigurationResourceFactoryImpl factory. - * - * - * @generated - */ - @Override - protected Map getRegistrations() { - if (registrations == null) { - super.getRegistrations(); - registrations.put(XML_EXTENSION, new ModifySemanticValuesActionConfigurationResourceFactoryImpl()); - registrations.put(STAR_EXTENSION, new ModifySemanticValuesActionConfigurationResourceFactoryImpl()); - } - return registrations; - } - -} //ModifySemanticValuesActionConfigurationXMLProcessor diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java new file mode 100644 index 00000000000..37ebf59c221 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java @@ -0,0 +1,42 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +/** + * + * A representation of the model object 'Runtime Values Edition Action Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration#getViewsToDisplay Views To Display}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getRuntimeValuesEditionActionConfiguration() + * @model + * @generated + */ +public interface RuntimeValuesEditionActionConfiguration extends SemanticActionConfiguration { + /** + * Returns the value of the 'Views To Display' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay}. + * + *

    + * If the meaning of the 'Views To Display' containment reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Views To Display' containment reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getRuntimeValuesEditionActionConfiguration_ViewsToDisplay() + * @model containment="true" + * @generated + */ + EList getViewsToDisplay(); + +} // RuntimeValuesEditionActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java new file mode 100644 index 00000000000..274c916db74 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage + * @generated + */ +public interface RuntimeValuesEditionActionConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + RuntimeValuesEditionActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Runtime Values Edition Action Configuration'. + * + * + * @return a new object of class 'Runtime Values Edition Action Configuration'. + * @generated + */ + RuntimeValuesEditionActionConfiguration createRuntimeValuesEditionActionConfiguration(); + + /** + * Returns a new object of class 'View To Display'. + * + * + * @return a new object of class 'View To Display'. + * @generated + */ + ViewToDisplay createViewToDisplay(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + RuntimeValuesEditionActionConfigurationPackage getRuntimeValuesEditionActionConfigurationPackage(); + +} //RuntimeValuesEditionActionConfigurationFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java new file mode 100644 index 00000000000..e363f20c8f7 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java @@ -0,0 +1,265 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationFactory + * @model kind="package" + * @generated + */ +public interface RuntimeValuesEditionActionConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "runtimevalueseditionactionconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/emf/runtimevalueseditionaction/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "runtimevalueseditionactionconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + RuntimeValuesEditionActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl Runtime Values Edition Action Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getRuntimeValuesEditionActionConfiguration() + * @generated + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * @generated + * @ordered + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * @generated + * @ordered + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY; + + /** + * The feature id for the 'Views To Display' containment reference list. + * + * + * @generated + * @ordered + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Runtime Values Edition Action Configuration' class. + * + * + * @generated + * @ordered + */ + int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl View To Display}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getViewToDisplay() + * @generated + */ + int VIEW_TO_DISPLAY = 1; + + /** + * The feature id for the 'View' reference. + * + * + * @generated + * @ordered + */ + int VIEW_TO_DISPLAY__VIEW = 0; + + /** + * The number of structural features of the 'View To Display' class. + * + * + * @generated + * @ordered + */ + int VIEW_TO_DISPLAY_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'View To Display' class. + * + * + * @generated + * @ordered + */ + int VIEW_TO_DISPLAY_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration Runtime Values Edition Action Configuration}'. + * + * + * @return the meta object for class 'Runtime Values Edition Action Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration + * @generated + */ + EClass getRuntimeValuesEditionActionConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration#getViewsToDisplay Views To Display}'. + * + * + * @return the meta object for the containment reference list 'Views To Display'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration#getViewsToDisplay() + * @see #getRuntimeValuesEditionActionConfiguration() + * @generated + */ + EReference getRuntimeValuesEditionActionConfiguration_ViewsToDisplay(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay View To Display}'. + * + * + * @return the meta object for class 'View To Display'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay + * @generated + */ + EClass getViewToDisplay(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView View}'. + * + * + * @return the meta object for the reference 'View'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView() + * @see #getViewToDisplay() + * @generated + */ + EReference getViewToDisplay_View(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + RuntimeValuesEditionActionConfigurationFactory getRuntimeValuesEditionActionConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl Runtime Values Edition Action Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getRuntimeValuesEditionActionConfiguration() + * @generated + */ + EClass RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION = eINSTANCE.getRuntimeValuesEditionActionConfiguration(); + + /** + * The meta object literal for the 'Views To Display' containment reference list feature. + * + * + * @generated + */ + EReference RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY = eINSTANCE.getRuntimeValuesEditionActionConfiguration_ViewsToDisplay(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl View To Display}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getViewToDisplay() + * @generated + */ + EClass VIEW_TO_DISPLAY = eINSTANCE.getViewToDisplay(); + + /** + * The meta object literal for the 'View' reference feature. + * + * + * @generated + */ + EReference VIEW_TO_DISPLAY__VIEW = eINSTANCE.getViewToDisplay_View(); + + } + +} //RuntimeValuesEditionActionConfigurationPackage diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java new file mode 100644 index 00000000000..55daa423e7b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java @@ -0,0 +1,52 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.views.properties.contexts.View; + +/** + * + * A representation of the model object 'View To Display'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView View}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getViewToDisplay() + * @model + * @generated + */ +public interface ViewToDisplay extends EObject { + /** + * Returns the value of the 'View' reference. + * + *

    + * If the meaning of the 'View' reference isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'View' reference. + * @see #setView(View) + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getViewToDisplay_View() + * @model required="true" + * @generated + */ + View getView(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView View}' reference. + * + * + * @param value the new value of the 'View' reference. + * @see #getView() + * @generated + */ + void setView(View value); + +} // ViewToDisplay diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java new file mode 100644 index 00000000000..61dfd3cfee4 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java @@ -0,0 +1,106 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class RuntimeValuesEditionActionConfigurationFactoryImpl extends EFactoryImpl implements RuntimeValuesEditionActionConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static RuntimeValuesEditionActionConfigurationFactory init() { + try { + RuntimeValuesEditionActionConfigurationFactory theRuntimeValuesEditionActionConfigurationFactory = (RuntimeValuesEditionActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(RuntimeValuesEditionActionConfigurationPackage.eNS_URI); + if (theRuntimeValuesEditionActionConfigurationFactory != null) { + return theRuntimeValuesEditionActionConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new RuntimeValuesEditionActionConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION: return createRuntimeValuesEditionActionConfiguration(); + case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY: return createViewToDisplay(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public RuntimeValuesEditionActionConfiguration createRuntimeValuesEditionActionConfiguration() { + RuntimeValuesEditionActionConfigurationImpl runtimeValuesEditionActionConfiguration = new RuntimeValuesEditionActionConfigurationImpl(); + return runtimeValuesEditionActionConfiguration; + } + + /** + * + * + * @generated + */ + public ViewToDisplay createViewToDisplay() { + ViewToDisplayImpl viewToDisplay = new ViewToDisplayImpl(); + return viewToDisplay; + } + + /** + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationPackage getRuntimeValuesEditionActionConfigurationPackage() { + return (RuntimeValuesEditionActionConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static RuntimeValuesEditionActionConfigurationPackage getPackage() { + return RuntimeValuesEditionActionConfigurationPackage.eINSTANCE; + } + +} //RuntimeValuesEditionActionConfigurationFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java new file mode 100644 index 00000000000..76a899fb04a --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java @@ -0,0 +1,152 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage; +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay; + +import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl; + +/** + * + * An implementation of the model object 'Runtime Values Edition Action Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl#getViewsToDisplay Views To Display}
    • + *
    + *

    + * + * @generated + */ +public class RuntimeValuesEditionActionConfigurationImpl extends SemanticActionConfigurationImpl implements RuntimeValuesEditionActionConfiguration { + /** + * The cached value of the '{@link #getViewsToDisplay() Views To Display}' containment reference list. + * + * + * @see #getViewsToDisplay() + * @generated + * @ordered + */ + protected EList viewsToDisplay; + + /** + * + * + * @generated + */ + protected RuntimeValuesEditionActionConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RuntimeValuesEditionActionConfigurationPackage.Literals.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getViewsToDisplay() { + if (viewsToDisplay == null) { + viewsToDisplay = new EObjectContainmentEList(ViewToDisplay.class, this, RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY); + } + return viewsToDisplay; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY: + return ((InternalEList)getViewsToDisplay()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY: + return getViewsToDisplay(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY: + getViewsToDisplay().clear(); + getViewsToDisplay().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY: + getViewsToDisplay().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY: + return viewsToDisplay != null && !viewsToDisplay.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RuntimeValuesEditionActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java new file mode 100644 index 00000000000..745276f1ed8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationFactory; +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage; +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay; + +import org.eclipse.papyrus.views.properties.contexts.ContextsPackage; + +import org.eclipse.papyrus.views.properties.environment.EnvironmentPackage; + +import org.eclipse.papyrus.views.properties.ui.UiPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class RuntimeValuesEditionActionConfigurationPackageImpl extends EPackageImpl implements RuntimeValuesEditionActionConfigurationPackage { + /** + * + * + * @generated + */ + private EClass runtimeValuesEditionActionConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass viewToDisplayEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private RuntimeValuesEditionActionConfigurationPackageImpl() { + super(eNS_URI, RuntimeValuesEditionActionConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link RuntimeValuesEditionActionConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static RuntimeValuesEditionActionConfigurationPackage init() { + if (isInited) return (RuntimeValuesEditionActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(RuntimeValuesEditionActionConfigurationPackage.eNS_URI); + + // Obtain or create and register package + RuntimeValuesEditionActionConfigurationPackageImpl theRuntimeValuesEditionActionConfigurationPackage = (RuntimeValuesEditionActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RuntimeValuesEditionActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RuntimeValuesEditionActionConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ExtendedtypesPackage.eINSTANCE.eClass(); + EnvironmentPackage.eINSTANCE.eClass(); + ContextsPackage.eINSTANCE.eClass(); + UiPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theRuntimeValuesEditionActionConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theRuntimeValuesEditionActionConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theRuntimeValuesEditionActionConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(RuntimeValuesEditionActionConfigurationPackage.eNS_URI, theRuntimeValuesEditionActionConfigurationPackage); + return theRuntimeValuesEditionActionConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getRuntimeValuesEditionActionConfiguration() { + return runtimeValuesEditionActionConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getRuntimeValuesEditionActionConfiguration_ViewsToDisplay() { + return (EReference)runtimeValuesEditionActionConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getViewToDisplay() { + return viewToDisplayEClass; + } + + /** + * + * + * @generated + */ + public EReference getViewToDisplay_View() { + return (EReference)viewToDisplayEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationFactory getRuntimeValuesEditionActionConfigurationFactory() { + return (RuntimeValuesEditionActionConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + runtimeValuesEditionActionConfigurationEClass = createEClass(RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION); + createEReference(runtimeValuesEditionActionConfigurationEClass, RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY); + + viewToDisplayEClass = createEClass(VIEW_TO_DISPLAY); + createEReference(viewToDisplayEClass, VIEW_TO_DISPLAY__VIEW); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); + ContextsPackage theContextsPackage = (ContextsPackage)EPackage.Registry.INSTANCE.getEPackage(ContextsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + runtimeValuesEditionActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(runtimeValuesEditionActionConfigurationEClass, RuntimeValuesEditionActionConfiguration.class, "RuntimeValuesEditionActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRuntimeValuesEditionActionConfiguration_ViewsToDisplay(), this.getViewToDisplay(), null, "viewsToDisplay", null, 0, -1, RuntimeValuesEditionActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(viewToDisplayEClass, ViewToDisplay.class, "ViewToDisplay", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getViewToDisplay_View(), theContextsPackage.getView(), null, "view", null, 1, 1, ViewToDisplay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //RuntimeValuesEditionActionConfigurationPackageImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java new file mode 100644 index 00000000000..6c4a1e2686b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java @@ -0,0 +1,158 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage; +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay; + +import org.eclipse.papyrus.views.properties.contexts.View; + +/** + * + * An implementation of the model object 'View To Display'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl#getView View}
    • + *
    + *

    + * + * @generated + */ +public class ViewToDisplayImpl extends MinimalEObjectImpl.Container implements ViewToDisplay { + /** + * The cached value of the '{@link #getView() View}' reference. + * + * + * @see #getView() + * @generated + * @ordered + */ + protected View view; + + /** + * + * + * @generated + */ + protected ViewToDisplayImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RuntimeValuesEditionActionConfigurationPackage.Literals.VIEW_TO_DISPLAY; + } + + /** + * + * + * @generated + */ + public View getView() { + if (view != null && view.eIsProxy()) { + InternalEObject oldView = (InternalEObject)view; + view = (View)eResolveProxy(oldView); + if (view != oldView) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW, oldView, view)); + } + } + return view; + } + + /** + * + * + * @generated + */ + public View basicGetView() { + return view; + } + + /** + * + * + * @generated + */ + public void setView(View newView) { + View oldView = view; + view = newView; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW, oldView, view)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW: + if (resolve) return getView(); + return basicGetView(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW: + setView((View)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW: + setView((View)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW: + return view != null; + } + return super.eIsSet(featureID); + } + +} //ViewToDisplayImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java new file mode 100644 index 00000000000..bb153d91131 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java @@ -0,0 +1,196 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage + * @generated + */ +public class RuntimeValuesEditionActionConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static RuntimeValuesEditionActionConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = RuntimeValuesEditionActionConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected RuntimeValuesEditionActionConfigurationSwitch modelSwitch = + new RuntimeValuesEditionActionConfigurationSwitch() { + @Override + public Adapter caseRuntimeValuesEditionActionConfiguration(RuntimeValuesEditionActionConfiguration object) { + return createRuntimeValuesEditionActionConfigurationAdapter(); + } + @Override + public Adapter caseViewToDisplay(ViewToDisplay object) { + return createViewToDisplayAdapter(); + } + @Override + public Adapter caseConfigurationElement(ConfigurationElement object) { + return createConfigurationElementAdapter(); + } + @Override + public Adapter caseActionConfiguration(ActionConfiguration object) { + return createActionConfigurationAdapter(); + } + @Override + public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return createSemanticActionConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration Runtime Values Edition Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration + * @generated + */ + public Adapter createRuntimeValuesEditionActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay View To Display}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay + * @generated + */ + public Adapter createViewToDisplayAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + public Adapter createConfigurationElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration + * @generated + */ + public Adapter createActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration Semantic Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration + * @generated + */ + public Adapter createSemanticActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //RuntimeValuesEditionActionConfigurationAdapterFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..39ee50b765d --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java @@ -0,0 +1,41 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util.RuntimeValuesEditionActionConfigurationResourceImpl + * @generated + */ +public class RuntimeValuesEditionActionConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new RuntimeValuesEditionActionConfigurationResourceImpl(uri); + return result; + } + +} //RuntimeValuesEditionActionConfigurationResourceFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java new file mode 100644 index 00000000000..49df6d9c773 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java @@ -0,0 +1,28 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util.RuntimeValuesEditionActionConfigurationResourceFactoryImpl + * @generated + */ +public class RuntimeValuesEditionActionConfigurationResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public RuntimeValuesEditionActionConfigurationResourceImpl(URI uri) { + super(uri); + } + +} //RuntimeValuesEditionActionConfigurationResourceImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java new file mode 100644 index 00000000000..ff18e23310b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java @@ -0,0 +1,183 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage + * @generated + */ +public class RuntimeValuesEditionActionConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static RuntimeValuesEditionActionConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = RuntimeValuesEditionActionConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION: { + RuntimeValuesEditionActionConfiguration runtimeValuesEditionActionConfiguration = (RuntimeValuesEditionActionConfiguration)theEObject; + T result = caseRuntimeValuesEditionActionConfiguration(runtimeValuesEditionActionConfiguration); + if (result == null) result = caseSemanticActionConfiguration(runtimeValuesEditionActionConfiguration); + if (result == null) result = caseActionConfiguration(runtimeValuesEditionActionConfiguration); + if (result == null) result = caseConfigurationElement(runtimeValuesEditionActionConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY: { + ViewToDisplay viewToDisplay = (ViewToDisplay)theEObject; + T result = caseViewToDisplay(viewToDisplay); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Runtime Values Edition Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Runtime Values Edition Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRuntimeValuesEditionActionConfiguration(RuntimeValuesEditionActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'View To Display'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'View To Display'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseViewToDisplay(ViewToDisplay object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationElement(ConfigurationElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseActionConfiguration(ActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //RuntimeValuesEditionActionConfigurationSwitch diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java new file mode 100644 index 00000000000..56b197b16bb --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java @@ -0,0 +1,50 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + +import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class RuntimeValuesEditionActionConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public RuntimeValuesEditionActionConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + RuntimeValuesEditionActionConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the RuntimeValuesEditionActionConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new RuntimeValuesEditionActionConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new RuntimeValuesEditionActionConfigurationResourceFactoryImpl()); + } + return registrations; + } + +} //RuntimeValuesEditionActionConfigurationXMLProcessor diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ConstantValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ConstantValue.java new file mode 100644 index 00000000000..fd8648e9488 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ConstantValue.java @@ -0,0 +1,50 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * + * A representation of the model object 'Constant Value'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue#getValueInstance Value Instance}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getConstantValue() + * @model + * @generated + */ +public interface ConstantValue extends FeatureValue { + /** + * Returns the value of the 'Value Instance' containment reference. + * + *

    + * If the meaning of the 'Value Instance' containment reference isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Value Instance' containment reference. + * @see #setValueInstance(ValueSpecification) + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getConstantValue_ValueInstance() + * @model containment="true" + * @generated + */ + ValueSpecification getValueInstance(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue#getValueInstance Value Instance}' containment reference. + * + * + * @param value the new value of the 'Value Instance' containment reference. + * @see #getValueInstance() + * @generated + */ + void setValueInstance(ValueSpecification value); + +} // ConstantValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/DynamicValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/DynamicValue.java new file mode 100644 index 00000000000..6df8d4728c0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/DynamicValue.java @@ -0,0 +1,17 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + + +/** + * + * A representation of the model object 'Dynamic Value'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getDynamicValue() + * @model abstract="true" + * @generated + */ +public interface DynamicValue extends FeatureValue { +} // DynamicValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java new file mode 100644 index 00000000000..4256ca2f085 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java @@ -0,0 +1,77 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Feature To Set'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getFeatureName Feature Name}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getValue Value}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getFeatureToSet() + * @model + * @generated + */ +public interface FeatureToSet extends EObject { + /** + * Returns the value of the 'Feature Name' attribute. + * + *

    + * If the meaning of the 'Feature Name' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Feature Name' attribute. + * @see #setFeatureName(String) + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getFeatureToSet_FeatureName() + * @model required="true" + * @generated + */ + String getFeatureName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getFeatureName Feature Name}' attribute. + * + * + * @param value the new value of the 'Feature Name' attribute. + * @see #getFeatureName() + * @generated + */ + void setFeatureName(String value); + + /** + * Returns the value of the 'Value' containment reference. + * + *

    + * If the meaning of the 'Value' containment reference isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Value' containment reference. + * @see #setValue(FeatureValue) + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getFeatureToSet_Value() + * @model containment="true" required="true" + * @generated + */ + FeatureValue getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getValue Value}' containment reference. + * + * + * @param value the new value of the 'Value' containment reference. + * @see #getValue() + * @generated + */ + void setValue(FeatureValue value); + +} // FeatureToSet diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValue.java new file mode 100644 index 00000000000..1d240e3e18b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValue.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Feature Value'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getFeatureValue() + * @model abstract="true" + * @generated + */ +public interface FeatureValue extends EObject { +} // FeatureValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ListValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ListValue.java new file mode 100644 index 00000000000..d9afe038250 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/ListValue.java @@ -0,0 +1,40 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'List Value'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue#getValues Values}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getListValue() + * @model + * @generated + */ +public interface ListValue extends FeatureValue { + /** + * Returns the value of the 'Values' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue}. + * + *

    + * If the meaning of the 'Values' containment reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Values' containment reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getListValue_Values() + * @model containment="true" + * @generated + */ + EList getValues(); + +} // ListValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/QueryExecutionValue.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/QueryExecutionValue.java new file mode 100644 index 00000000000..7e7f316158c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/QueryExecutionValue.java @@ -0,0 +1,17 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + + +/** + * + * A representation of the model object 'Query Execution Value'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getQueryExecutionValue() + * @model + * @generated + */ +public interface QueryExecutionValue extends DynamicValue { +} // QueryExecutionValue diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfiguration.java new file mode 100644 index 00000000000..01c438dd26b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfiguration.java @@ -0,0 +1,42 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +/** + * + * A representation of the model object 'Set Values Action Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration#getFeaturesToSet Features To Set}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getSetValuesActionConfiguration() + * @model + * @generated + */ +public interface SetValuesActionConfiguration extends SemanticActionConfiguration { + /** + * Returns the value of the 'Features To Set' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet}. + * + *

    + * If the meaning of the 'Features To Set' containment reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Features To Set' containment reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getSetValuesActionConfiguration_FeaturesToSet() + * @model containment="true" + * @generated + */ + EList getFeaturesToSet(); + +} // SetValuesActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationFactory.java new file mode 100644 index 00000000000..14d12ca24b8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationFactory.java @@ -0,0 +1,78 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage + * @generated + */ +public interface SetValuesActionConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + SetValuesActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Set Values Action Configuration'. + * + * + * @return a new object of class 'Set Values Action Configuration'. + * @generated + */ + SetValuesActionConfiguration createSetValuesActionConfiguration(); + + /** + * Returns a new object of class 'Feature To Set'. + * + * + * @return a new object of class 'Feature To Set'. + * @generated + */ + FeatureToSet createFeatureToSet(); + + /** + * Returns a new object of class 'Constant Value'. + * + * + * @return a new object of class 'Constant Value'. + * @generated + */ + ConstantValue createConstantValue(); + + /** + * Returns a new object of class 'List Value'. + * + * + * @return a new object of class 'List Value'. + * @generated + */ + ListValue createListValue(); + + /** + * Returns a new object of class 'Query Execution Value'. + * + * + * @return a new object of class 'Query Execution Value'. + * @generated + */ + QueryExecutionValue createQueryExecutionValue(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + SetValuesActionConfigurationPackage getSetValuesActionConfigurationPackage(); + +} //SetValuesActionConfigurationFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java new file mode 100644 index 00000000000..e00b481a62c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java @@ -0,0 +1,534 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationFactory + * @model kind="package" + * @generated + */ +public interface SetValuesActionConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "setvaluesactionconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/emf/setvaluesaction/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "setvaluesactionconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + SetValuesActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationImpl Set Values Action Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getSetValuesActionConfiguration() + * @generated + */ + int SET_VALUES_ACTION_CONFIGURATION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SET_VALUES_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SET_VALUES_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * @generated + * @ordered + */ + int SET_VALUES_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * @generated + * @ordered + */ + int SET_VALUES_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY; + + /** + * The feature id for the 'Features To Set' containment reference list. + * + * + * @generated + * @ordered + */ + int SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Set Values Action Configuration' class. + * + * + * @generated + * @ordered + */ + int SET_VALUES_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl Feature To Set}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getFeatureToSet() + * @generated + */ + int FEATURE_TO_SET = 1; + + /** + * The feature id for the 'Feature Name' attribute. + * + * + * @generated + * @ordered + */ + int FEATURE_TO_SET__FEATURE_NAME = 0; + + /** + * The feature id for the 'Value' containment reference. + * + * + * @generated + * @ordered + */ + int FEATURE_TO_SET__VALUE = 1; + + /** + * The number of structural features of the 'Feature To Set' class. + * + * + * @generated + * @ordered + */ + int FEATURE_TO_SET_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureValueImpl Feature Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getFeatureValue() + * @generated + */ + int FEATURE_VALUE = 2; + + /** + * The number of structural features of the 'Feature Value' class. + * + * + * @generated + * @ordered + */ + int FEATURE_VALUE_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.DynamicValueImpl Dynamic Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.DynamicValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getDynamicValue() + * @generated + */ + int DYNAMIC_VALUE = 3; + + /** + * The number of structural features of the 'Dynamic Value' class. + * + * + * @generated + * @ordered + */ + int DYNAMIC_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ConstantValueImpl Constant Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ConstantValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getConstantValue() + * @generated + */ + int CONSTANT_VALUE = 4; + + /** + * The feature id for the 'Value Instance' containment reference. + * + * + * @generated + * @ordered + */ + int CONSTANT_VALUE__VALUE_INSTANCE = FEATURE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Constant Value' class. + * + * + * @generated + * @ordered + */ + int CONSTANT_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ListValueImpl List Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ListValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getListValue() + * @generated + */ + int LIST_VALUE = 5; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int LIST_VALUE__VALUES = FEATURE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'List Value' class. + * + * + * @generated + * @ordered + */ + int LIST_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.QueryExecutionValueImpl Query Execution Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.QueryExecutionValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getQueryExecutionValue() + * @generated + */ + int QUERY_EXECUTION_VALUE = 6; + + /** + * The number of structural features of the 'Query Execution Value' class. + * + * + * @generated + * @ordered + */ + int QUERY_EXECUTION_VALUE_FEATURE_COUNT = DYNAMIC_VALUE_FEATURE_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration Set Values Action Configuration}'. + * + * + * @return the meta object for class 'Set Values Action Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration + * @generated + */ + EClass getSetValuesActionConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration#getFeaturesToSet Features To Set}'. + * + * + * @return the meta object for the containment reference list 'Features To Set'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration#getFeaturesToSet() + * @see #getSetValuesActionConfiguration() + * @generated + */ + EReference getSetValuesActionConfiguration_FeaturesToSet(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet Feature To Set}'. + * + * + * @return the meta object for class 'Feature To Set'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet + * @generated + */ + EClass getFeatureToSet(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getFeatureName Feature Name}'. + * + * + * @return the meta object for the attribute 'Feature Name'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getFeatureName() + * @see #getFeatureToSet() + * @generated + */ + EAttribute getFeatureToSet_FeatureName(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getValue Value}'. + * + * + * @return the meta object for the containment reference 'Value'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getValue() + * @see #getFeatureToSet() + * @generated + */ + EReference getFeatureToSet_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue Feature Value}'. + * + * + * @return the meta object for class 'Feature Value'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue + * @generated + */ + EClass getFeatureValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue Dynamic Value}'. + * + * + * @return the meta object for class 'Dynamic Value'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue + * @generated + */ + EClass getDynamicValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue Constant Value}'. + * + * + * @return the meta object for class 'Constant Value'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue + * @generated + */ + EClass getConstantValue(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue#getValueInstance Value Instance}'. + * + * + * @return the meta object for the containment reference 'Value Instance'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue#getValueInstance() + * @see #getConstantValue() + * @generated + */ + EReference getConstantValue_ValueInstance(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue List Value}'. + * + * + * @return the meta object for class 'List Value'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue + * @generated + */ + EClass getListValue(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue#getValues Values}'. + * + * + * @return the meta object for the containment reference list 'Values'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue#getValues() + * @see #getListValue() + * @generated + */ + EReference getListValue_Values(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue Query Execution Value}'. + * + * + * @return the meta object for class 'Query Execution Value'. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue + * @generated + */ + EClass getQueryExecutionValue(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + SetValuesActionConfigurationFactory getSetValuesActionConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationImpl Set Values Action Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getSetValuesActionConfiguration() + * @generated + */ + EClass SET_VALUES_ACTION_CONFIGURATION = eINSTANCE.getSetValuesActionConfiguration(); + + /** + * The meta object literal for the 'Features To Set' containment reference list feature. + * + * + * @generated + */ + EReference SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET = eINSTANCE.getSetValuesActionConfiguration_FeaturesToSet(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl Feature To Set}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getFeatureToSet() + * @generated + */ + EClass FEATURE_TO_SET = eINSTANCE.getFeatureToSet(); + + /** + * The meta object literal for the 'Feature Name' attribute feature. + * + * + * @generated + */ + EAttribute FEATURE_TO_SET__FEATURE_NAME = eINSTANCE.getFeatureToSet_FeatureName(); + + /** + * The meta object literal for the 'Value' containment reference feature. + * + * + * @generated + */ + EReference FEATURE_TO_SET__VALUE = eINSTANCE.getFeatureToSet_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureValueImpl Feature Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getFeatureValue() + * @generated + */ + EClass FEATURE_VALUE = eINSTANCE.getFeatureValue(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.DynamicValueImpl Dynamic Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.DynamicValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getDynamicValue() + * @generated + */ + EClass DYNAMIC_VALUE = eINSTANCE.getDynamicValue(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ConstantValueImpl Constant Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ConstantValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getConstantValue() + * @generated + */ + EClass CONSTANT_VALUE = eINSTANCE.getConstantValue(); + + /** + * The meta object literal for the 'Value Instance' containment reference feature. + * + * + * @generated + */ + EReference CONSTANT_VALUE__VALUE_INSTANCE = eINSTANCE.getConstantValue_ValueInstance(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ListValueImpl List Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ListValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getListValue() + * @generated + */ + EClass LIST_VALUE = eINSTANCE.getListValue(); + + /** + * The meta object literal for the 'Values' containment reference list feature. + * + * + * @generated + */ + EReference LIST_VALUE__VALUES = eINSTANCE.getListValue_Values(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.QueryExecutionValueImpl Query Execution Value}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.QueryExecutionValueImpl + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationPackageImpl#getQueryExecutionValue() + * @generated + */ + EClass QUERY_EXECUTION_VALUE = eINSTANCE.getQueryExecutionValue(); + + } + +} //SetValuesActionConfigurationPackage diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ConstantValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ConstantValueImpl.java new file mode 100644 index 00000000000..eef24525fd9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ConstantValueImpl.java @@ -0,0 +1,176 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * + * An implementation of the model object 'Constant Value'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ConstantValueImpl#getValueInstance Value Instance}
    • + *
    + *

    + * + * @generated + */ +public class ConstantValueImpl extends FeatureValueImpl implements ConstantValue { + /** + * The cached value of the '{@link #getValueInstance() Value Instance}' containment reference. + * + * + * @see #getValueInstance() + * @generated + * @ordered + */ + protected ValueSpecification valueInstance; + + /** + * + * + * @generated + */ + protected ConstantValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.CONSTANT_VALUE; + } + + /** + * + * + * @generated + */ + public ValueSpecification getValueInstance() { + return valueInstance; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValueInstance(ValueSpecification newValueInstance, NotificationChain msgs) { + ValueSpecification oldValueInstance = valueInstance; + valueInstance = newValueInstance; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, oldValueInstance, newValueInstance); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setValueInstance(ValueSpecification newValueInstance) { + if (newValueInstance != valueInstance) { + NotificationChain msgs = null; + if (valueInstance != null) + msgs = ((InternalEObject)valueInstance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, null, msgs); + if (newValueInstance != null) + msgs = ((InternalEObject)newValueInstance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, null, msgs); + msgs = basicSetValueInstance(newValueInstance, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, newValueInstance, newValueInstance)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + return basicSetValueInstance(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + return getValueInstance(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + setValueInstance((ValueSpecification)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + setValueInstance((ValueSpecification)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + return valueInstance != null; + } + return super.eIsSet(featureID); + } + +} //ConstantValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/DynamicValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/DynamicValueImpl.java new file mode 100644 index 00000000000..691b14c942b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/DynamicValueImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +/** + * + * An implementation of the model object 'Dynamic Value'. + * + *

    + *

    + * + * @generated + */ +public abstract class DynamicValueImpl extends FeatureValueImpl implements DynamicValue { + /** + * + * + * @generated + */ + protected DynamicValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.DYNAMIC_VALUE; + } + +} //DynamicValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java new file mode 100644 index 00000000000..3d8730ef73c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java @@ -0,0 +1,244 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +/** + * + * An implementation of the model object 'Feature To Set'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl#getFeatureName Feature Name}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl#getValue Value}
    • + *
    + *

    + * + * @generated + */ +public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet { + /** + * The default value of the '{@link #getFeatureName() Feature Name}' attribute. + * + * + * @see #getFeatureName() + * @generated + * @ordered + */ + protected static final String FEATURE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFeatureName() Feature Name}' attribute. + * + * + * @see #getFeatureName() + * @generated + * @ordered + */ + protected String featureName = FEATURE_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getValue() Value}' containment reference. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected FeatureValue value; + + /** + * + * + * @generated + */ + protected FeatureToSetImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.FEATURE_TO_SET; + } + + /** + * + * + * @generated + */ + public String getFeatureName() { + return featureName; + } + + /** + * + * + * @generated + */ + public void setFeatureName(String newFeatureName) { + String oldFeatureName = featureName; + featureName = newFeatureName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SetValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME, oldFeatureName, featureName)); + } + + /** + * + * + * @generated + */ + public FeatureValue getValue() { + return value; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValue(FeatureValue newValue, NotificationChain msgs) { + FeatureValue oldValue = value; + value = newValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, oldValue, newValue); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setValue(FeatureValue newValue) { + if (newValue != value) { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE, newValue, newValue)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: + return basicSetValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + return getFeatureName(); + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + setFeatureName((String)newValue); + return; + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: + setValue((FeatureValue)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + setFeatureName(FEATURE_NAME_EDEFAULT); + return; + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: + setValue((FeatureValue)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName); + case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE: + return value != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (featureName: "); + result.append(featureName); + result.append(')'); + return result.toString(); + } + +} //FeatureToSetImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureValueImpl.java new file mode 100644 index 00000000000..1898a58e8ce --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureValueImpl.java @@ -0,0 +1,41 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +/** + * + * An implementation of the model object 'Feature Value'. + * + *

    + *

    + * + * @generated + */ +public abstract class FeatureValueImpl extends EObjectImpl implements FeatureValue { + /** + * + * + * @generated + */ + protected FeatureValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.FEATURE_VALUE; + } + +} //FeatureValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ListValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ListValueImpl.java new file mode 100644 index 00000000000..589bb198a93 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/ListValueImpl.java @@ -0,0 +1,150 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +/** + * + * An implementation of the model object 'List Value'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.ListValueImpl#getValues Values}
    • + *
    + *

    + * + * @generated + */ +public class ListValueImpl extends FeatureValueImpl implements ListValue { + /** + * The cached value of the '{@link #getValues() Values}' containment reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected ListValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.LIST_VALUE; + } + + /** + * + * + * @generated + */ + public EList getValues() { + if (values == null) { + values = new EObjectContainmentEList(FeatureValue.class, this, SetValuesActionConfigurationPackage.LIST_VALUE__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SetValuesActionConfigurationPackage.LIST_VALUE__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SetValuesActionConfigurationPackage.LIST_VALUE__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SetValuesActionConfigurationPackage.LIST_VALUE__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.LIST_VALUE__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.LIST_VALUE__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ListValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/QueryExecutionValueImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/QueryExecutionValueImpl.java new file mode 100644 index 00000000000..eadffb5b66b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/QueryExecutionValueImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +/** + * + * An implementation of the model object 'Query Execution Value'. + * + *

    + *

    + * + * @generated + */ +public class QueryExecutionValueImpl extends DynamicValueImpl implements QueryExecutionValue { + /** + * + * + * @generated + */ + protected QueryExecutionValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.QUERY_EXECUTION_VALUE; + } + +} //QueryExecutionValueImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationFactoryImpl.java new file mode 100644 index 00000000000..af7395a0f7a --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationFactoryImpl.java @@ -0,0 +1,139 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class SetValuesActionConfigurationFactoryImpl extends EFactoryImpl implements SetValuesActionConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static SetValuesActionConfigurationFactory init() { + try { + SetValuesActionConfigurationFactory theSetValuesActionConfigurationFactory = (SetValuesActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(SetValuesActionConfigurationPackage.eNS_URI); + if (theSetValuesActionConfigurationFactory != null) { + return theSetValuesActionConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new SetValuesActionConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public SetValuesActionConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION: return createSetValuesActionConfiguration(); + case SetValuesActionConfigurationPackage.FEATURE_TO_SET: return createFeatureToSet(); + case SetValuesActionConfigurationPackage.CONSTANT_VALUE: return createConstantValue(); + case SetValuesActionConfigurationPackage.LIST_VALUE: return createListValue(); + case SetValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE: return createQueryExecutionValue(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SetValuesActionConfiguration createSetValuesActionConfiguration() { + SetValuesActionConfigurationImpl setValuesActionConfiguration = new SetValuesActionConfigurationImpl(); + return setValuesActionConfiguration; + } + + /** + * + * + * @generated + */ + public FeatureToSet createFeatureToSet() { + FeatureToSetImpl featureToSet = new FeatureToSetImpl(); + return featureToSet; + } + + /** + * + * + * @generated + */ + public ConstantValue createConstantValue() { + ConstantValueImpl constantValue = new ConstantValueImpl(); + return constantValue; + } + + /** + * + * + * @generated + */ + public ListValue createListValue() { + ListValueImpl listValue = new ListValueImpl(); + return listValue; + } + + /** + * + * + * @generated + */ + public QueryExecutionValue createQueryExecutionValue() { + QueryExecutionValueImpl queryExecutionValue = new QueryExecutionValueImpl(); + return queryExecutionValue; + } + + /** + * + * + * @generated + */ + public SetValuesActionConfigurationPackage getSetValuesActionConfigurationPackage() { + return (SetValuesActionConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static SetValuesActionConfigurationPackage getPackage() { + return SetValuesActionConfigurationPackage.eINSTANCE; + } + +} //SetValuesActionConfigurationFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationImpl.java new file mode 100644 index 00000000000..bbdb00879e5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationImpl.java @@ -0,0 +1,152 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl; + +/** + * + * An implementation of the model object 'Set Values Action Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.SetValuesActionConfigurationImpl#getFeaturesToSet Features To Set}
    • + *
    + *

    + * + * @generated + */ +public class SetValuesActionConfigurationImpl extends SemanticActionConfigurationImpl implements SetValuesActionConfiguration { + /** + * The cached value of the '{@link #getFeaturesToSet() Features To Set}' containment reference list. + * + * + * @see #getFeaturesToSet() + * @generated + * @ordered + */ + protected EList featuresToSet; + + /** + * + * + * @generated + */ + protected SetValuesActionConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetValuesActionConfigurationPackage.Literals.SET_VALUES_ACTION_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getFeaturesToSet() { + if (featuresToSet == null) { + featuresToSet = new EObjectContainmentEList(FeatureToSet.class, this, SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET); + } + return featuresToSet; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: + return ((InternalEList)getFeaturesToSet()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: + return getFeaturesToSet(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: + getFeaturesToSet().clear(); + getFeaturesToSet().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: + getFeaturesToSet().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET: + return featuresToSet != null && !featuresToSet.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //SetValuesActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java new file mode 100644 index 00000000000..9c1cfe5c701 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java @@ -0,0 +1,367 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationFactory; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +import org.eclipse.uml2.uml.UMLPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class SetValuesActionConfigurationPackageImpl extends EPackageImpl implements SetValuesActionConfigurationPackage { + /** + * + * + * @generated + */ + private EClass setValuesActionConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass featureToSetEClass = null; + + /** + * + * + * @generated + */ + private EClass featureValueEClass = null; + + /** + * + * + * @generated + */ + private EClass dynamicValueEClass = null; + + /** + * + * + * @generated + */ + private EClass constantValueEClass = null; + + /** + * + * + * @generated + */ + private EClass listValueEClass = null; + + /** + * + * + * @generated + */ + private EClass queryExecutionValueEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private SetValuesActionConfigurationPackageImpl() { + super(eNS_URI, SetValuesActionConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link SetValuesActionConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static SetValuesActionConfigurationPackage init() { + if (isInited) return (SetValuesActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(SetValuesActionConfigurationPackage.eNS_URI); + + // Obtain or create and register package + SetValuesActionConfigurationPackageImpl theSetValuesActionConfigurationPackage = (SetValuesActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SetValuesActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SetValuesActionConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ExtendedtypesPackage.eINSTANCE.eClass(); + UMLPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theSetValuesActionConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theSetValuesActionConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theSetValuesActionConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(SetValuesActionConfigurationPackage.eNS_URI, theSetValuesActionConfigurationPackage); + return theSetValuesActionConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getSetValuesActionConfiguration() { + return setValuesActionConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getSetValuesActionConfiguration_FeaturesToSet() { + return (EReference)setValuesActionConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFeatureToSet() { + return featureToSetEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFeatureToSet_FeatureName() { + return (EAttribute)featureToSetEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFeatureToSet_Value() { + return (EReference)featureToSetEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFeatureValue() { + return featureValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getDynamicValue() { + return dynamicValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getConstantValue() { + return constantValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getConstantValue_ValueInstance() { + return (EReference)constantValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getListValue() { + return listValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getListValue_Values() { + return (EReference)listValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getQueryExecutionValue() { + return queryExecutionValueEClass; + } + + /** + * + * + * @generated + */ + public SetValuesActionConfigurationFactory getSetValuesActionConfigurationFactory() { + return (SetValuesActionConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + setValuesActionConfigurationEClass = createEClass(SET_VALUES_ACTION_CONFIGURATION); + createEReference(setValuesActionConfigurationEClass, SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET); + + featureToSetEClass = createEClass(FEATURE_TO_SET); + createEAttribute(featureToSetEClass, FEATURE_TO_SET__FEATURE_NAME); + createEReference(featureToSetEClass, FEATURE_TO_SET__VALUE); + + featureValueEClass = createEClass(FEATURE_VALUE); + + dynamicValueEClass = createEClass(DYNAMIC_VALUE); + + constantValueEClass = createEClass(CONSTANT_VALUE); + createEReference(constantValueEClass, CONSTANT_VALUE__VALUE_INSTANCE); + + listValueEClass = createEClass(LIST_VALUE); + createEReference(listValueEClass, LIST_VALUE__VALUES); + + queryExecutionValueEClass = createEClass(QUERY_EXECUTION_VALUE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + setValuesActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration()); + dynamicValueEClass.getESuperTypes().add(this.getFeatureValue()); + constantValueEClass.getESuperTypes().add(this.getFeatureValue()); + listValueEClass.getESuperTypes().add(this.getFeatureValue()); + queryExecutionValueEClass.getESuperTypes().add(this.getDynamicValue()); + + // Initialize classes and features; add operations and parameters + initEClass(setValuesActionConfigurationEClass, SetValuesActionConfiguration.class, "SetValuesActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSetValuesActionConfiguration_FeaturesToSet(), this.getFeatureToSet(), null, "featuresToSet", null, 0, -1, SetValuesActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(featureToSetEClass, FeatureToSet.class, "FeatureToSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFeatureToSet_FeatureName(), theEcorePackage.getEString(), "featureName", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFeatureToSet_Value(), this.getFeatureValue(), null, "value", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(featureValueEClass, FeatureValue.class, "FeatureValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(dynamicValueEClass, DynamicValue.class, "DynamicValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(constantValueEClass, ConstantValue.class, "ConstantValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConstantValue_ValueInstance(), theUMLPackage.getValueSpecification(), null, "valueInstance", null, 0, 1, ConstantValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(listValueEClass, ListValue.class, "ListValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getListValue_Values(), this.getFeatureValue(), null, "values", null, 0, -1, ListValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(queryExecutionValueEClass, QueryExecutionValue.class, "QueryExecutionValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //SetValuesActionConfigurationPackageImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java new file mode 100644 index 00000000000..636f23e3581 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java @@ -0,0 +1,286 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage + * @generated + */ +public class SetValuesActionConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static SetValuesActionConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public SetValuesActionConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = SetValuesActionConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected SetValuesActionConfigurationSwitch modelSwitch = + new SetValuesActionConfigurationSwitch() { + @Override + public Adapter caseSetValuesActionConfiguration(SetValuesActionConfiguration object) { + return createSetValuesActionConfigurationAdapter(); + } + @Override + public Adapter caseFeatureToSet(FeatureToSet object) { + return createFeatureToSetAdapter(); + } + @Override + public Adapter caseFeatureValue(FeatureValue object) { + return createFeatureValueAdapter(); + } + @Override + public Adapter caseDynamicValue(DynamicValue object) { + return createDynamicValueAdapter(); + } + @Override + public Adapter caseConstantValue(ConstantValue object) { + return createConstantValueAdapter(); + } + @Override + public Adapter caseListValue(ListValue object) { + return createListValueAdapter(); + } + @Override + public Adapter caseQueryExecutionValue(QueryExecutionValue object) { + return createQueryExecutionValueAdapter(); + } + @Override + public Adapter caseConfigurationElement(ConfigurationElement object) { + return createConfigurationElementAdapter(); + } + @Override + public Adapter caseActionConfiguration(ActionConfiguration object) { + return createActionConfigurationAdapter(); + } + @Override + public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return createSemanticActionConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration Set Values Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration + * @generated + */ + public Adapter createSetValuesActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet Feature To Set}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet + * @generated + */ + public Adapter createFeatureToSetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue Feature Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue + * @generated + */ + public Adapter createFeatureValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue Dynamic Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue + * @generated + */ + public Adapter createDynamicValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue Constant Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue + * @generated + */ + public Adapter createConstantValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue List Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue + * @generated + */ + public Adapter createListValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue Query Execution Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue + * @generated + */ + public Adapter createQueryExecutionValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + public Adapter createConfigurationElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration + * @generated + */ + public Adapter createActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration Semantic Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration + * @generated + */ + public Adapter createSemanticActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //SetValuesActionConfigurationAdapterFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..3341457baaf --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java @@ -0,0 +1,52 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util.SetValuesActionConfigurationResourceImpl + * @generated + */ +public class SetValuesActionConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public SetValuesActionConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + XMLResource result = new SetValuesActionConfigurationResourceImpl(uri); + result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + + result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); + return result; + } + +} //SetValuesActionConfigurationResourceFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java new file mode 100644 index 00000000000..1128b718b84 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java @@ -0,0 +1,28 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util.SetValuesActionConfigurationResourceFactoryImpl + * @generated + */ +public class SetValuesActionConfigurationResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public SetValuesActionConfigurationResourceImpl(URI uri) { + super(uri); + } + +} //SetValuesActionConfigurationResourceImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java new file mode 100644 index 00000000000..7d8927760d1 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java @@ -0,0 +1,293 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage + * @generated + */ +public class SetValuesActionConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static SetValuesActionConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public SetValuesActionConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = SetValuesActionConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION: { + SetValuesActionConfiguration setValuesActionConfiguration = (SetValuesActionConfiguration)theEObject; + T result = caseSetValuesActionConfiguration(setValuesActionConfiguration); + if (result == null) result = caseSemanticActionConfiguration(setValuesActionConfiguration); + if (result == null) result = caseActionConfiguration(setValuesActionConfiguration); + if (result == null) result = caseConfigurationElement(setValuesActionConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SetValuesActionConfigurationPackage.FEATURE_TO_SET: { + FeatureToSet featureToSet = (FeatureToSet)theEObject; + T result = caseFeatureToSet(featureToSet); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SetValuesActionConfigurationPackage.FEATURE_VALUE: { + FeatureValue featureValue = (FeatureValue)theEObject; + T result = caseFeatureValue(featureValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SetValuesActionConfigurationPackage.DYNAMIC_VALUE: { + DynamicValue dynamicValue = (DynamicValue)theEObject; + T result = caseDynamicValue(dynamicValue); + if (result == null) result = caseFeatureValue(dynamicValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SetValuesActionConfigurationPackage.CONSTANT_VALUE: { + ConstantValue constantValue = (ConstantValue)theEObject; + T result = caseConstantValue(constantValue); + if (result == null) result = caseFeatureValue(constantValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SetValuesActionConfigurationPackage.LIST_VALUE: { + ListValue listValue = (ListValue)theEObject; + T result = caseListValue(listValue); + if (result == null) result = caseFeatureValue(listValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SetValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE: { + QueryExecutionValue queryExecutionValue = (QueryExecutionValue)theEObject; + T result = caseQueryExecutionValue(queryExecutionValue); + if (result == null) result = caseDynamicValue(queryExecutionValue); + if (result == null) result = caseFeatureValue(queryExecutionValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Set Values Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Set Values Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSetValuesActionConfiguration(SetValuesActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Feature To Set'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Feature To Set'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFeatureToSet(FeatureToSet object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Feature Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Feature Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFeatureValue(FeatureValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dynamic Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dynamic Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDynamicValue(DynamicValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Constant Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Constant Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConstantValue(ConstantValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'List Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'List Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseListValue(ListValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Query Execution Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Query Execution Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseQueryExecutionValue(QueryExecutionValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationElement(ConfigurationElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseActionConfiguration(ActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //SetValuesActionConfigurationSwitch diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java new file mode 100644 index 00000000000..ddfb5916c90 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java @@ -0,0 +1,50 @@ +/** + */ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class SetValuesActionConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public SetValuesActionConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + SetValuesActionConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the SetValuesActionConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new SetValuesActionConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new SetValuesActionConfigurationResourceFactoryImpl()); + } + return registrations; + } + +} //SetValuesActionConfigurationXMLProcessor diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java new file mode 100644 index 00000000000..b98c371da72 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java @@ -0,0 +1,70 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import org.eclipse.uml2.uml.ValueSpecification; + + +/** + * Exception thrown when no converter was found + */ +public class ConverterNotfoundException extends Exception { + + /** serialization id */ + private static final long serialVersionUID = -8863603362830475612L; + + /** target parameter type */ + private final Class parameterType; + + /** source value instance */ + private final ValueSpecification valueInstance; + + /** + * Creates a new {@link ConverterNotfoundException}. + * + * @param parameterType + * the target type of the value + * @param valueInstance + * the value specification defining the entering value and type + */ + public ConverterNotfoundException(Class parameterType, ValueSpecification valueInstance) { + this.parameterType = parameterType; + this.valueInstance = valueInstance; + } + + /** + * Returns the target parameter type + * + * @return the target parameter type + */ + public Class getParameterType() { + return parameterType; + } + + /** + * Returns the value specification defining the entering value and type + * + * @return the value specification defining the entering value and type + */ + public ValueSpecification getValueInstance() { + return valueInstance; + } + + /** + * {@inheritDoc} + */ + @Override + public String getMessage() { + return "Converter not found for target type: " + getParameterType() + " and for initial value: " + getValueInstance(); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java new file mode 100644 index 00000000000..d6e61859cad --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java @@ -0,0 +1,153 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.databinding.conversion.IConverter; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.uml2.uml.Enumeration; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * Registry to store onverters. + */ +public class ConverterRegistry { + + /** singleton instance */ + private static ConverterRegistry instance; + + /** map to store converters, identified by their class */ + private Map, IConverter> converterMaps = new HashMap, IConverter>(); + + /** + * Constructor (not visible: singleton pattern) + */ + private ConverterRegistry() { + } + + /** + * Returns the single instance of this registry + * + * @return the single instance of this registry + */ + public static synchronized ConverterRegistry getSingleton() { + if(instance == null) { + instance = new ConverterRegistry(); + instance.initializeRegistry(); + } + return instance; + } + + /** + * Initialize the registry + */ + protected void initializeRegistry() { + converterMaps.put(String.class, new ValueSpecificationToStringConverter()); + converterMaps.put(int.class, new ValueSpecificationToIntegerConverter()); + converterMaps.put(boolean.class, new ValueSpecificationToBooleanConverter()); + converterMaps.put(Enumeration.class, new ValueSpecificationToEnumerationConverter()); + converterMaps.put(EEnum.class, new ValueSpecificationToEENumConverter()); + } + + /** + * Returns the converter for the convenient type, from an {@link Object} + * + * @param toType + * the class into which the element should be transformed + * + * @return the converter for the convenient type + */ + public IConverter getConverter(Class toType) { + return converterMaps.get(toType); + } + + public Object convert(Class parameterType, ValueSpecification valueInstance) throws ConverterNotfoundException { + // retrieve the converter + IConverter converter = getConverter(parameterType); + + if(converter != null) { + return converter.convert(valueInstance); + } else { + throw new ConverterNotfoundException(parameterType, valueInstance); + } + } + +// /** +// * Converts a parameter value into a list of values +// * +// * @param context +// * the context of the evaluation of the query +// * @param parameterType +// * the type of the list +// * @param parameterValue +// * the parameter value to transform into a list +// * @return the list of values contained by the parameter value +// */ +// public List convertToList(final EObject context, final Class parameterType, final ParameterValue parameterValue) { +// return new ConfigurationSwitch>() { +// +// /** +// * {@inheritDoc} +// */ +// @Override +// public java.util.List caseConstantParameterValue(ConstantParameterValue constantParameterValue) { +// IConverter converter = getConverter(parameterType); +// +// if(converter != null) { +// return Arrays.asList(converter.convert(constantParameterValue.getValueInstance())); +// } else { +// Activator.log.error("Impossible to find a converter for type: " + parameterType, null); +// return Collections.emptyList(); +// } +// }; +// +// /** +// * {@inheritDoc} +// */ +// @Override +// public java.util.List caseQueryExecutionValue(QueryExecutionValue queryExecutionValue) { +// // if query returns a list, returns it, else creates an array of one element +// QueryConfiguration queryConfiguration = queryExecutionValue.getConfiguration(); +// if(!(queryConfiguration instanceof ModiscoQueryConfiguration)) { +// throw new RuntimeException("List conversion not implemented for this type of configuration. " + queryConfiguration.eClass().getName()); +// } +// Object executionResult = null; +// try { +// executionResult = QueryUtil.evaluateBooleanQuery(context, queryConfiguration); +// } catch (Exception e) { +// Activator.log.error(e); +// } +// int upperBound = ((ModiscoQueryConfiguration)queryConfiguration).getQuery().getUpperBound(); +// if(upperBound == 1) { +// return Arrays.asList(executionResult); +// } else { +// return (List)executionResult; +// } +// }; +// +// /** +// * {@inheritDoc} +// */ +// @Override +// public java.util.List caseListParameterValue(ListParameterValue listParameterValue) { +// List values = new ArrayList(); +// for(ParameterValue parameterValue : listParameterValue.getValues()) { +// values.addAll(convertToList(context, parameterType, parameterValue)); +// } +// return values; +// }; +// +// }.doSwitch(parameterValue); +// } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java new file mode 100644 index 00000000000..d5253cba6b9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java @@ -0,0 +1,49 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; + + +/** + * Converter for Objects to Boolean value + */ +public class ObjectToBooleanConverter extends Converter implements IConverter { + + /** + * Creates a new ObjectToBooleanConverter + */ + public ObjectToBooleanConverter() { + super(Object.class, Boolean.class); + } + + /** + * {@inheritDoc} + */ + public Boolean convert(Object fromObject) { + if(fromObject == null) { + return null; + } + + if(fromObject instanceof Boolean) { + return ((Boolean)fromObject); + } + + if(fromObject instanceof String) { + return Boolean.valueOf((String)fromObject); + } + + return null; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java new file mode 100644 index 00000000000..795d3bcff06 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; + +/** + * Converter from an object to an integer + */ +public class ObjectToIntegerConverter extends Converter implements IConverter { + + /** + * Default constructor. + */ + public ObjectToIntegerConverter() { + super(Object.class, Integer.class); + } + + /** + * {@inheritDoc} + */ + public Integer convert(Object fromObject) { + if(fromObject == null) { + return null; + } + + if(fromObject instanceof Integer) { + return (Integer)fromObject; + } + + if(fromObject instanceof String) { + return Integer.parseInt((String)fromObject); + } + + return null; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java new file mode 100644 index 00000000000..316c55b4b97 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java @@ -0,0 +1,37 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * Converter from a {@link ValueSpecification} to a {@link Boolean} value + */ +public class ValueSpecificationToBooleanConverter extends Converter implements IConverter { + + /** + * Creates a new ValueSpecificationToBooleanConverter. + */ + public ValueSpecificationToBooleanConverter() { + super(ValueSpecification.class, boolean.class); + } + + /** + * {@inheritDoc} + */ + public Object convert(Object fromObject) { + return ((ValueSpecification)fromObject).booleanValue(); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java new file mode 100644 index 00000000000..5e69b4d8e44 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java @@ -0,0 +1,71 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.uml2.uml.EnumerationLiteral; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.InstanceValue; +import org.eclipse.uml2.uml.ValueSpecification; +import org.eclipse.uml2.uml.VisibilityKind; + + +/** + * @author RS211865 + */ +public class ValueSpecificationToEENumConverter extends Converter implements IConverter { + + /** + * @param fromType + * @param toType + */ + public ValueSpecificationToEENumConverter() { + super(ValueSpecification.class, EEnum.class); + } + + /** + * {@inheritDoc} + */ + public Object convert(Object fromObject) { + if(fromObject instanceof InstanceValue) { + InstanceSpecification instanceSpecification = ((InstanceValue)fromObject).getInstance(); + if(instanceSpecification instanceof EnumerationLiteral) { + + System.err.println(VisibilityKind.PRIVATE_LITERAL); + Class eclass = ((EnumerationLiteral)instanceSpecification).getEnumeration().eClass().getInstanceClass(); + System.err.println(eclass.getEnumConstants()); + System.err.println(eclass); + + + + + + +// final EEnumLiteral literal = eenum.getEEnumLiteral(umlLiteral.getName()); +// if(literal != null) { +// return literal.getInstance(); +// } +// return null; +// + System.err.println(instanceSpecification); + + + //return ((EnumerationLiteral)instanceSpecification).; + } + } + + return fromObject; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java new file mode 100644 index 00000000000..92f5e460d44 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java @@ -0,0 +1,50 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; +import org.eclipse.uml2.uml.Enumeration; +import org.eclipse.uml2.uml.EnumerationLiteral; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.InstanceValue; +import org.eclipse.uml2.uml.ValueSpecification; + + +/** + * Converter for enumeration values + */ +public class ValueSpecificationToEnumerationConverter extends Converter implements IConverter { + + /** + * @param fromType + * @param toType + */ + public ValueSpecificationToEnumerationConverter() { + super(ValueSpecification.class, Enumeration.class); + } + + /** + * {@inheritDoc} + */ + public Object convert(Object fromObject) { + if(fromObject instanceof InstanceValue) { + InstanceSpecification instanceSpecification = ((InstanceValue)fromObject).getInstance(); + if(instanceSpecification instanceof EnumerationLiteral) { + return ((EnumerationLiteral)instanceSpecification); + } + } + + return fromObject; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java new file mode 100644 index 00000000000..084de0ece78 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java @@ -0,0 +1,36 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * Converter from a {@link ValueSpecification} to an {@link Integer}. + */ +public class ValueSpecificationToIntegerConverter extends Converter implements IConverter { + + /** + * Creates a new {@link ValueSpecificationToIntegerConverter}. + */ + public ValueSpecificationToIntegerConverter() { + super(ValueSpecification.class, int.class); + } + + /** + * {@inheritDoc} + */ + public Object convert(Object fromObject) { + return ((ValueSpecification)fromObject).integerValue(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java new file mode 100644 index 00000000000..12222332688 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java @@ -0,0 +1,37 @@ +/***************************************************************************** + * 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.infra.extendedtypes.emf.converter; + +import org.eclipse.core.databinding.conversion.Converter; +import org.eclipse.core.databinding.conversion.IConverter; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * Converter from a {@link ValueSpecification} to an {@link String}. + */ +public class ValueSpecificationToStringConverter extends Converter implements IConverter { + + /** + * Creates a new {@link ValueSpecificationToStringConverter}. + */ + public ValueSpecificationToStringConverter() { + super(ValueSpecification.class, String.class); + } + + /** + * {@inheritDoc} + */ + public Object convert(Object fromObject) { + return ((ValueSpecification)fromObject).stringValue(); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java deleted file mode 100644 index 5ecc4b638bd..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java +++ /dev/null @@ -1,186 +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.infra.extendedtypes.emf.providers; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; -import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; -import org.eclipse.gmf.runtime.common.core.service.IOperation; -import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.emf.Activator; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue; -import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util.ModifySemanticValuesActionConfigurationSwitch; -import org.eclipse.papyrus.infra.extendedtypes.providers.GetAllExtendedElementTypeActionProvidersOperation; -import org.eclipse.papyrus.infra.extendedtypes.providers.GetExtendedElementTypeActionProviderOperation; -import org.eclipse.papyrus.infra.extendedtypes.providers.IExtendedElementTypeActionProvider; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; -import org.eclipse.papyrus.infra.queries.core.converter.ConverterNotfoundException; -import org.eclipse.papyrus.infra.queries.core.converter.ConverterRegistry; -import org.eclipse.papyrus.infra.queries.core.modisco.QueryUtil; -import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; -import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; - -/** - * Provider for Action that set semantic values to an element on creation - */ -public class ModifySemanticValuesActionProvider extends AbstractProvider implements IExtendedElementTypeActionProvider { - - /** - * {@inheritDoc} - */ - public boolean provides(IOperation operation) { - if(operation instanceof GetAllExtendedElementTypeActionProvidersOperation) { - return true; - } - if(operation instanceof GetExtendedElementTypeActionProviderOperation) { - return (((GetExtendedElementTypeActionProviderOperation)operation).getActionConfiguration() instanceof ModifySemanticValuesActionConfiguration); - } - return false; - } - - /** - * {@inheritDoc} - */ - public ICommand getICommand(List elementsToEdit, ActionConfiguration configuration) { - // try to create the command that will apply the stereotypes - if(!(configuration instanceof ModifySemanticValuesActionConfiguration)) { - Activator.log.error("Trying to configure a modify semantic values action configuration with a configuration which is not a semantic value one: " + configuration, null); - return UnexecutableCommand.INSTANCE; - } - - CompositeCommand compositeCommand = new CompositeCommand("Set Values"); - ModifySemanticValuesActionConfiguration modifySemanticValuesActionConfiguration = (ModifySemanticValuesActionConfiguration)configuration; - - // for each object in the list of eobjects to edit, create the stereotype apply command - for(Object objectToEdit : elementsToEdit) { - // for each feature in the configuration, sets the value - if(objectToEdit instanceof EObject) { - for(FeatureToSet featureToSet : modifySemanticValuesActionConfiguration.getFeaturesToSet()) { - // create a command from a set request and use the Papyrus edit service - EObject eObject = (EObject)objectToEdit; - EStructuralFeature feature = eObject.eClass().getEStructuralFeature(featureToSet.getFeatureName()); - if(feature != null && feature.isChangeable()) { - // retrieve the value to set - FeatureValue featureValue = featureToSet.getValue(); - Object value = computeValue(eObject, feature, featureValue); - SetRequest request = new SetRequest(eObject, feature, value); - IElementEditService service = ElementEditServiceUtils.getCommandProvider(eObject); - ICommand command = service.getEditCommand(request); - if(command != null) { - compositeCommand.add(command); - } - } - } - - // for dynamic features, opens the pop up and ask for the values to set - } - } - return compositeCommand; - } - - /** - * Retrieves the value from the feature value parameter - * - * @param eObject - * the context of the value - * @param feature - * the feature for which the value is computed - * @param featureValue - * the representation of the value of the feature from which to compute the real value - * @return the value of the feature - */ - protected Object computeValue(final EObject eObject, final EStructuralFeature feature, FeatureValue featureValue) { - Object value = new ModifySemanticValuesActionConfigurationSwitch() { - - /** - * {@inheritDoc} - */ - @Override - public Object caseListValue(ListValue listValue) { - List values = new ArrayList(); - for(FeatureValue fValue : listValue.getValues()) { - Object value = computeValue(eObject, feature, fValue); - values.add(value); - } - return values; - }; - - /** - * {@inheritDoc} - */ - @Override - public Object caseQueryExecutionValue(QueryExecutionValue queryExecutionValue) { - Object value = null; - QueryConfiguration configuration = queryExecutionValue.getConfiguration(); - try { - value = QueryUtil.evaluateQuery(eObject, configuration); - } catch (Exception e) { - Activator.log.error(e); - } - return value; - }; - - /** - * {@inheritDoc} - */ - @Override - public Object caseConstantValue(ConstantValue constantValue) { - Class parameterType = feature.getEType().getInstanceClass(); - try { - Object convertedValue = ConverterRegistry.getSingleton().convert(parameterType, constantValue.getValueInstance()); - return convertedValue; - } catch (ConverterNotfoundException e) { - Activator.log.error(e); - } - return null; - } - - }.doSwitch(featureValue); - - return value; - } - - /** - * {@inheritDoc} - */ - public ICommand getBeforeCreateValidationCommand(List elementsToEdit, ActionConfiguration configuration) { - // here, element to edit should be the parent of the created element on which the stereotype is applied. - ModifySemanticValuesActionConfiguration modifySemanticValuesActionConfiguration = (ModifySemanticValuesActionConfiguration)configuration; - - for(Object objectToEdit : elementsToEdit) { - // FIXME ... - } - // returns a null command, which means it is possible to apply the stereotype - return null; - } - - /** - * {@inheritDoc} - */ - public void setConfiguration(IConfigurationElement element) { - // something to do here ? - } - -} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java new file mode 100644 index 00000000000..d709ce447ee --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java @@ -0,0 +1,29 @@ + +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation; + +/** + * {@link IActionConfigurationModelCreation} for {@link SetValuesActionConfiguration} + */ +public class RuntimeValuesEditionActionConfigurationModelCreation implements IActionConfigurationModelCreation { + + /** + * {@inheritDoc} + */ + public RuntimeValuesEditionActionConfiguration createConfigurationModel() { + return RuntimeValuesEditionActionConfigurationFactory.eINSTANCE.createRuntimeValuesEditionActionConfiguration(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java new file mode 100644 index 00000000000..6e0279917f3 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java @@ -0,0 +1,36 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator; +import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator; + +/** + * {@link ICreationElementValidator} for {@link SetValuesActionConfiguration} + */ +public class RuntimeValuesEditionActionCreationElementValidator implements IActionCreationElementValidator { + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + return true; + } + + /** + * {@inheritDoc} + */ + public void init(RuntimeValuesEditionActionConfiguration configuration) { + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java new file mode 100644 index 00000000000..5a9b8495d47 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java @@ -0,0 +1,138 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration; +import org.eclipse.papyrus.views.properties.contexts.View; +import org.eclipse.papyrus.views.properties.creation.EditionDialog; +import org.eclipse.swt.widgets.Display; + +/** + * advice for the {@link SetValuesActionConfiguration} + */ +public class RuntimeValuesEditionActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice { + + /** list of views to display */ + protected Set viewsToDisplay; + + /** + * {@inheritDoc} + */ + public void init(RuntimeValuesEditionActionConfiguration configuration) { + viewsToDisplay = new HashSet(); + for(ViewToDisplay display : configuration.getViewsToDisplay()) { + View view = display.getView(); + if(view!=null) { + viewsToDisplay.add(view); + } + } + } + + /** + * Default Constructor + */ + public RuntimeValuesEditionActionEditHelperAdvice() { + } + + /** + * {@inheritDoc} + */ + public boolean approveRequest(IEditCommandRequest request) { + return super.approveRequest(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeCreateCommand(CreateElementRequest request) { + return super.getBeforeCreateCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterCreateCommand(CreateElementRequest request) { + return super.getAfterCreateCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + return super.getBeforeConfigureCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterConfigureCommand(final ConfigureRequest request) { + final EObject elementToConfigure = request.getElementToConfigure(); + if(elementToConfigure==null) { + return null; + } + + return new AbstractTransactionalCommand(request.getEditingDomain(), "Editing "+EMFCoreUtil.getName(elementToConfigure), Collections.singletonList(WorkspaceSynchronizer.getFile((elementToConfigure.eResource())))) { + /** + * {@inheritDoc} + */ + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { + Set viewsToDisplay = getViewsToDisplay(); + if(!viewsToDisplay.isEmpty()) { + EditionDialog dialog = new EditionDialog(Display.getCurrent().getActiveShell()) { + + }; + dialog.setTitle("Edit "+EMFCoreUtil.getName(elementToConfigure)); + dialog.setViews(viewsToDisplay); + dialog.setInput(elementToConfigure); + + dialog.open(); + } + + return CommandResult.newOKCommandResult(elementToConfigure); + } + }; + + } + + + /** + * @return the viewsToDisplay + */ + public Set getViewsToDisplay() { + return viewsToDisplay; + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java new file mode 100644 index 00000000000..d26a56ddcd4 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java @@ -0,0 +1,132 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.emf.converter.ConverterNotfoundException; +import org.eclipse.papyrus.infra.extendedtypes.emf.converter.ConverterRegistry; +import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util.SetValuesActionConfigurationSwitch; +import org.eclipse.uml2.uml.DataType; +import org.eclipse.uml2.uml.Enumeration; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.InstanceValue; +import org.eclipse.uml2.uml.PrimitiveType; +import org.eclipse.uml2.uml.ValueSpecification; + + +/** + * Utility class to get values from a {@link FeatureValue} + */ +public class FeatureValueUtils { + + protected FeatureValueUtils() { + // no instanciation, helper class + } + + /** + * Returns the value to set for a given feature of a given element + * @param elementToConfigure eobject for which feature is set. This must not be null + * @param feature {@link EStructuralFeature} to set. This must not be null + * @param valueModel configuration of the value, stored in the model + * @return the real value that will be set to the object or null if none could be computed + */ + public static Object getValue(final EObject elementToConfigure, final EStructuralFeature feature, final FeatureValue featureValue) { + + Object result = new SetValuesActionConfigurationSwitch() { + /** + * {@inheritDoc} + */ + @Override + public Object caseConstantValue(ConstantValue object) { + ValueSpecification valueSpecification = object.getValueInstance(); + + if(valueSpecification==null) { + return null; + } + + try { + EClassifier type = feature.getEType(); + if(type instanceof EEnum) { + String value = ((InstanceValue)valueSpecification).getInstance().getName(); + return ((EEnum)type).getEEnumLiteral(value).getInstance(); + // return ConverterRegistry.getSingleton().convert(EEnum.class, valueSpecification); + } else if(type instanceof EDataType) { + final EDataType pType = (EDataType)type; + final String name = pType.getName(); + if("Boolean".equals(name)) { + return ConverterRegistry.getSingleton().convert(boolean.class, valueSpecification); + } else if("Integer".equals(name)) { + return ConverterRegistry.getSingleton().convert(int.class, valueSpecification); + } else if("Real".equals(name)) { + return ConverterRegistry.getSingleton().convert(double.class, valueSpecification); + } else if("String".equals(name)) { + return ConverterRegistry.getSingleton().convert(String.class, valueSpecification); + } else if("UnlimitedNatural".equals(name)) { + return ConverterRegistry.getSingleton().convert(int.class, valueSpecification); + } else { //custom PrimitiveType + return ConverterRegistry.getSingleton().convert(String.class, valueSpecification); + } + } else if(type instanceof DataType) {//FIXME manage the data type + return ConverterRegistry.getSingleton().convert(String.class, valueSpecification); + } + return ConverterRegistry.getSingleton().convert(feature.getEType().getInstanceClass(), valueSpecification); + } catch (ConverterNotfoundException e) { + Activator.log.error("Impossible to convert "+valueSpecification+ " to fit feature type :"+feature, e); + } + return super.caseConstantValue(object); + } + + /** + * {@inheritDoc} + */ + @Override + public Object caseQueryExecutionValue(QueryExecutionValue object) { + throw new UnsupportedOperationException("Query execution values resolution has not been implemented yet"); + }; + + /** + * {@inheritDoc} + */ + @Override + public Object caseDynamicValue(DynamicValue object) { + throw new UnsupportedOperationException("Dynamic values resolution has not been implemented yet"); + }; + + /** + * {@inheritDoc} + */ + @Override + public Object caseListValue(ListValue object) { + // resolve one by one all features in the values list of this listvalue + List results = new ArrayList(); + for(FeatureValue value : object.getValues()) { + Object singleResult = getValue(elementToConfigure, feature, value); + results.add(singleResult); + } + return results; + }; + + }.doSwitch(featureValue); + return result; + } + + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationModelCreation.java new file mode 100644 index 00000000000..d74773cccba --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationModelCreation.java @@ -0,0 +1,29 @@ + +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation; + +/** + * {@link IActionConfigurationModelCreation} for {@link SetValuesActionConfiguration} + */ +public class SetValuesActionConfigurationModelCreation implements IActionConfigurationModelCreation { + + /** + * {@inheritDoc} + */ + public SetValuesActionConfiguration createConfigurationModel() { + return SetValuesActionConfigurationFactory.eINSTANCE.createSetValuesActionConfiguration(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionCreationElementValidator.java new file mode 100644 index 00000000000..bd969c6452c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionCreationElementValidator.java @@ -0,0 +1,36 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator; +import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator; + +/** + * {@link ICreationElementValidator} for {@link SetValuesActionConfiguration} + */ +public class SetValuesActionCreationElementValidator implements IActionCreationElementValidator { + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + return true; + } + + /** + * {@inheritDoc} + */ + public void init(SetValuesActionConfiguration configuration) { + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java new file mode 100644 index 00000000000..e27e08a6e78 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java @@ -0,0 +1,177 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.emf.Activator; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; + +/** + * advice for the {@link SetValuesActionConfiguration} + */ +public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice { + + /** list of the features to set */ + //protected Map featuresToValues = null; + /** list of runtime defined features */ + //protected Map featuresToRuntimeDefinitions = null; + + /** list of static defined features */ + protected Map featuresToStaticDefinitions = null; + + /** + * {@inheritDoc} + */ + public void init(SetValuesActionConfiguration configuration) { + //featuresToRuntimeDefinitions = new HashMap(); + featuresToStaticDefinitions = new HashMap(); + if(configuration == null) { + return; + } + for(FeatureToSet featureToSet : configuration.getFeaturesToSet()) { + featuresToStaticDefinitions.put(featureToSet.getFeatureName(), featureToSet.getValue()); + } + } + + /** + * Default Constructor + */ + public SetValuesActionEditHelperAdvice() { + } + + /** + * {@inheritDoc} + */ + public boolean approveRequest(IEditCommandRequest request) { + return super.approveRequest(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeCreateCommand(CreateElementRequest request) { + return super.getBeforeCreateCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterCreateCommand(CreateElementRequest request) { + return super.getAfterCreateCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + return super.getBeforeConfigureCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterConfigureCommand(ConfigureRequest request) { + ICommand resultCommand = null; + + // retrieve eobject + EObject elementToConfigure = request.getElementToConfigure(); + if(elementToConfigure==null) { + return null; + } + // retrieve edit service to get features from configure command + IElementEditService service = ElementEditServiceUtils.getCommandProvider(elementToConfigure); + if(service == null) { + Activator.log.error("Impossible to get edit service from element: "+elementToConfigure, null); + return null; + } + + for(Entry featureEntry: featuresToStaticDefinitions.entrySet()) { + // retrieve feature value + ICommand command = getSetFeatureValueCommand(elementToConfigure, featureEntry.getKey(), featureEntry.getValue(), service, request); + if(command !=null) { + if(resultCommand == null) { + resultCommand = command; + } else { + resultCommand = resultCommand.compose(command); + } + } + } + +// if(!featuresToRuntimeDefinitions.isEmpty()) { +// ICommand command = getDynamicSetFeatureValueCommand(elementToConfigure, featuresToRuntimeDefinitions, service, request); +// if(command !=null) { +// if(resultCommand == null) { +// resultCommand = command; +// } else { +// resultCommand = resultCommand.compose(command); +// } +// } +// } + + + if(resultCommand!=null) { + return resultCommand.reduce(); + } + + + return super.getAfterConfigureCommand(request); + } + + + /** + * @param elementToConfigure + * the eobject to configure + * @param name + * the name of the feature to set + * @param value + * the new value of the feature + */ + protected ICommand getSetFeatureValueCommand(EObject elementToConfigure, String name, FeatureValue featureValue, IElementEditService service, ConfigureRequest configureRequest) { + if(name == null) { + Activator.log.debug("No feature name has been set."); + return null; + } + if(elementToConfigure.eClass() == null) { + Activator.log.error("Impossible to find EClass from EObject: " + elementToConfigure, null); + return null; + } + // retrieve structural feature for the element to configure + EStructuralFeature feature = elementToConfigure.eClass().getEStructuralFeature(name); + if(feature == null) { + Activator.log.error("Impossible to find feature " + name + " for eobject " + elementToConfigure, null); + return null; + } + Object value = FeatureValueUtils.getValue(elementToConfigure, feature, featureValue); + SetRequest request = new SetRequest(elementToConfigure, feature, value); + // duplicate parameters from configure request? + request.addParameters(configureRequest.getParameters()); + return service.getEditCommand(request); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/.classpath b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/.classpath index afb9bb46ef3..756f4289006 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/.classpath +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF index 8fe2e90f82e..6c9133f3d07 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF @@ -1,22 +1,30 @@ Manifest-Version: 1.0 Export-Package: org.eclipse.papyrus.infra.extendedtypes, org.eclipse.papyrus.infra.extendedtypes.advices, + org.eclipse.papyrus.infra.extendedtypes.handler, org.eclipse.papyrus.infra.extendedtypes.impl, + org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration, + org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl, + org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util, + org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration, + org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl, + org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util, org.eclipse.papyrus.infra.extendedtypes.preferences, org.eclipse.papyrus.infra.extendedtypes.providers, + org.eclipse.papyrus.infra.extendedtypes.semantic, org.eclipse.papyrus.infra.extendedtypes.types, org.eclipse.papyrus.infra.extendedtypes.util Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0", org.eclipse.emf.ecore;bundle-version="2.7.0";visibility:=reexport, org.eclipse.emf.ecore.xmi;bundle-version="2.6.0";visibility:=reexport, - org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0", - org.eclipse.emf.facet.infra.query;bundle-version="0.1.0", + org.eclipse.uml2.types;visibility:=reexport, org.eclipse.uml2.uml;bundle-version="3.2.0", org.eclipse.ui;bundle-version="3.7.0", org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0", - org.eclipse.papyrus.infra.queries.core;bundle-version="1.0.0", - org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.3.0" + org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.3.0", + org.eclipse.papyrus.infra.core;bundle-version="1.0.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties index 0513499e537..0fcee5a52b8 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/build.properties @@ -1,8 +1,16 @@ -# -#Mon Sep 12 09:29:52 CEST 2011 -output..=bin/ -bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,schema/,about.html -jars.compile.order=. -src.includes = about.html -source..=src-gen/,src/ -bin..=bin/ +# +#Mon Sep 12 09:29:52 CEST 2011 +output..=bin/ +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + schema/,\ + about.html,\ + icons/ +jars.compile.order=. +src.includes = about.html +source.. = src-gen/,\ + src/ +bin..=bin/ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif new file mode 100644 index 00000000000..0b1be97b8cf Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/configuration.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif new file mode 100644 index 00000000000..9b048d60532 Binary files /dev/null and b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/icons/error.gif differ diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore index 84985e67146..632a12059d0 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore @@ -1,42 +1,64 @@ - + - + upperBound="-1" eType="#//ElementTypeConfiguration" containment="true"/> + - - - - + - - - - + - - - + + + + + - + + - + + +
    + + + + +
    + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecorediag index 0757d3c6b7c..59719be883a 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecorediag +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecorediag @@ -3,9 +3,9 @@ - - - + + + @@ -16,37 +16,25 @@ - + - + - - - - - - - - - + - + - + - - - - @@ -56,9 +44,9 @@ - - - + + + @@ -80,90 +68,191 @@ - + - - - - -
    - - - - - - - - - - - - - - - + - - - - - - + + + + + + - - - + + + - - - + + + + + + + - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + @@ -172,10 +261,10 @@ - - + + - + @@ -184,51 +273,124 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel index dbaf61ba388..a69abb53eea 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel @@ -1,38 +1,51 @@ - - - ExtendedTypes.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + ExtendedTypes.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecore new file mode 100644 index 00000000000..c11a512b311 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecore @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecorediag new file mode 100644 index 00000000000..a7d36d4e800 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.ecorediag @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.genmodel new file mode 100644 index 00000000000..e370f0ec056 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantContainerConfiguration.genmodel @@ -0,0 +1,22 @@ + + + InvariantContainerConfiguration.ecore + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecore new file mode 100644 index 00000000000..733a4536d89 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecore @@ -0,0 +1,18 @@ + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecorediag new file mode 100644 index 00000000000..7da4b3c881c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.ecorediag @@ -0,0 +1,178 @@ + + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.genmodel new file mode 100644 index 00000000000..293d863d31e --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/model/InvariantSemanticTypeConfiguration.genmodel @@ -0,0 +1,25 @@ + + + InvariantSemanticTypeConfiguration.ecore + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml index fc82ce61a32..2fd59656b57 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml @@ -1,51 +1,216 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/aspectActionConfiguration.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/aspectActionConfiguration.exsd new file mode 100644 index 00000000000..263ec8afad5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/aspectActionConfiguration.exsd @@ -0,0 +1,156 @@ + + + + + + + + + Extension point to describe new kind of Pre/Post actions in the extended element types framework. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.10.1 + + + + + + + + + See examples in the emf or uml extended types + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + + + + + Copyright (c) 2014 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: +CEA LIST - initial API and implementation + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/elementMatcherConfiguration.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/elementMatcherConfiguration.exsd new file mode 100644 index 00000000000..6a3b87e33ad --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/elementMatcherConfiguration.exsd @@ -0,0 +1,129 @@ + + + + + + + + + Extension point to define new kind of model-based configurable IElementMatcher and their factories + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + class name of the configuration model implementation + + + + + + + + + + class name of the factory used to create new element matchers based on the given configuration + + + + + + + + + + + + + + + + + + + + + + + + + 0.10.1 + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedElementTypeSet.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedElementTypeSet.exsd new file mode 100644 index 00000000000..4489e6359c7 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedElementTypeSet.exsd @@ -0,0 +1,130 @@ + + + + + + + + + This extension point is used to registered element type sets configuration models + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + define a new configuration for an extended element type set + + + + + + + Name of this model file, used in user interface + + + + + + + Path to an icon, used in user interface + + + + + + + + + + Description of the configuration + + + + + + + Path to the model file in the bundle. + +Note: Do not forget to add the file in the binary build of the plugin! + + + + + + + + + + The unique identifier of this contribution. To ease debug, it is advised to put the same identifier as the extended type set configuration identifier. + + + + + + + + + + + + 0.10.2 + + + + + + + + + + + + Copyright (c) 2010-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: +CEA LIST - initial API and implementation + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypeConfiguration.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypeConfiguration.exsd new file mode 100644 index 00000000000..bd02f7fe3a8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypeConfiguration.exsd @@ -0,0 +1,141 @@ + + + + + + + + + This extension point is used to registered new kind of extended element types set configuration for creation of semantic/graphical elements + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + define a new configuration for an extended element type set + + + + + + + Name of this model file, used in user interface + + + + + + + Path to an icon, used in user interface + + + + + + + + + + Description of the configuration + + + + + + + factory class that creates new ElementTypes based on the configuration model + + + + + + + + + + Configuration class of the element type. + + + + + + + + + + optional item provider used to add creation menus in the standard emf editor + + + + + + + + + + + + + + + 0.10.2 + + + + + + + + + + + + Copyright (c) 2010-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: +CEA LIST - initial API and implementation + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypesSetConfiguration.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypesSetConfiguration.exsd deleted file mode 100644 index ef2762d198a..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/extendedTypesSetConfiguration.exsd +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - This extension point is used to registered new extended element types for creation of semantic elements with specific post/pre actions and validation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - define a new configuration for an extended element type set - - - - - - - Name of this model file, used in user interface - - - - - - - Path to an icon, used in user interface - - - - - - - - - - Description of the configuration - - - - - - - Path to the model file in the bundle. - -Note: Do not forget to add the file in the binary build of the plugin! - - - - - - - - - - The unique identifier of this contribution. To ease debug, it is advised to put the same identifier as the extended type set configuration identifier. - - - - - - - - - - - - 0.7.1 - - - - - - - - - - - - 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: -CEA LIST - initial API and implementation - - - - diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/invariantRule.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/invariantRule.exsd new file mode 100644 index 00000000000..86e2f06cd0f --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/invariantRule.exsd @@ -0,0 +1,142 @@ + + + + + + + + + Extension point to describe new invariant rules. These rules will be used by configurable element types at runtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/semanticTypeFactory.exsd b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/semanticTypeFactory.exsd new file mode 100644 index 00000000000..1c9fc0286c6 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/schema/semanticTypeFactory.exsd @@ -0,0 +1,152 @@ + + + + + + + + + Extension point to describe new semantic type factories that will be configured by some EMF models. These factories will be usd to create new semantic ElementTypes (see GMF framework for more information about ElementTypes) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension for new factories for semantic element types + + + + + + + Name of this factory (used in UIs) + + + + + + + Implementation class of this factory. + + + + + + + + + + Ecore file of the metamodel used to configure this factory + + + + + + + + + + EClass of the main configuration element. This is used to identify the factory amongst others during element type creation. + +This EClass is expected to be defined in the factory metamodel. + + + + + + + + + + + + + + + 1.0.0 - Initial API and Contribution by CEA LIST + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + + + + + 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: +CEA LIST - initial API and implementation + + + + diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ActionConfiguration.java index df2cf89d490..6e17452e0c9 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ActionConfiguration.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ActionConfiguration.java @@ -1,81 +1,26 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes; -import org.eclipse.emf.ecore.EObject; - /** * * A representation of the model object 'Action Configuration'. * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getLabel Label}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getId Id}
    • - *
    - *

    - * + * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getActionConfiguration() * @model abstract="true" * @generated */ -public interface ActionConfiguration extends EObject { - /** - * Returns the value of the 'Label' attribute. - * - *

    - * If the meaning of the 'Label' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Label' attribute. - * @see #setLabel(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getActionConfiguration_Label() - * @model - * @generated - */ - String getLabel(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getLabel Label}' attribute. - * - * - * @param value the new value of the 'Label' attribute. - * @see #getLabel() - * @generated - */ - void setLabel(String value); - - /** - * Returns the value of the 'Id' attribute. - * - *

    - * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getActionConfiguration_Id() - * @model required="true" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - +public interface ActionConfiguration extends ConfigurationElement { } // ActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeConfiguration.java new file mode 100644 index 00000000000..0f41cfbe10c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeConfiguration.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Aspect Semantic Type Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration#getActionConfiguration Action Configuration}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getAspectSemanticTypeConfiguration() + * @model + * @generated + */ +public interface AspectSemanticTypeConfiguration extends SemanticTypeConfiguration { + + /** + * Returns the value of the 'Action Configuration' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration}. + * + *

    + * If the meaning of the 'Action Configuration' containment reference list isn't clear, there really should be more of a description + * here... + *

    + * + * + * @return the value of the 'Action Configuration' containment reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getAspectSemanticTypeConfiguration_ActionConfiguration() + * @model containment="true" + * @generated + */ + EList getActionConfiguration(); +} // AspectSemanticTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeConfiguration.java new file mode 100644 index 00000000000..3a8113d7300 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeConfiguration.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Aspect View Type Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration#getActionConfiguration Action Configuration}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getAspectViewTypeConfiguration() + * @model + * @generated + */ +public interface AspectViewTypeConfiguration extends ViewTypeConfiguration { + + /** + * Returns the value of the 'Action Configuration' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration}. + * + *

    + * If the meaning of the 'Action Configuration' containment reference list isn't clear, there really should be more of a description + * here... + *

    + * + * + * @return the value of the 'Action Configuration' containment reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getAspectViewTypeConfiguration_ActionConfiguration() + * @model containment="true" + * @generated + */ + EList getActionConfiguration(); +} // AspectViewTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java new file mode 100644 index 00000000000..07f25277ea4 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java @@ -0,0 +1,110 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.NullElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; + + +/** + * @author RS211865 + */ +public class AspectViewTypeFactory extends AbstractConfigurableElementTypeFactory { + + /** + * Default Constructor + */ + public AspectViewTypeFactory() { + } + + /** + * {@inheritDoc} + */ + @Override + protected IEditHelperAdvice createEditHelperAdvice(AspectViewTypeConfiguration configuration) { +// List semanticActionConfigurations = configuration.getActionConfiguration(); +// List actionAdvices = new ArrayList(semanticActionConfigurations.size()); +// for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) { +// IEditHelperAdvice advice = AspectConfigurationFactoryRegistry.getInstance().createEditHelperAdvice(actionConfiguration); +// if(advice!=null) { +// actionAdvices.add(advice); +//// } else { +//// Activator.log.error("Impossible to create an advice for :" + actionConfiguration, null); +// } +// } +// if(actionAdvices!=null && actionAdvices.size() > 0) { +// return new ComposedEditHelperAdvice(actionAdvices); +// } + return new AbstractEditHelperAdvice() { + + }; + } + + /** + * {@inheritDoc} + */ + @Override + protected IContainerDescriptor createContainerDescriptor(AspectViewTypeConfiguration configuration) { +// List semanticActionConfigurations = configuration.getActionConfiguration(); +// List containerDescriptors = new ArrayList(semanticActionConfigurations.size()); +// for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) { +// IContainerDescriptor containerDescriptor = AspectConfigurationFactoryRegistry.getInstance().createContainerDescriptor(actionConfiguration); +// if(containerDescriptor!=null) { +// containerDescriptors.add(containerDescriptor); +//// } else { +//// Activator.log.error("Impossible to create a container descriptor for :" + actionConfiguration, null); +// } +// } +// if(containerDescriptors!=null && containerDescriptors.size() > 0) { +// return new ComposedContainerDescriptor(containerDescriptors); +// } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public ICreationElementValidator createElementCreationValidator(AspectViewTypeConfiguration configuration) { +// List semanticActionConfigurations = configuration.getActionConfiguration(); +// List actionValidators = new ArrayList(semanticActionConfigurations.size()); +// for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) { +// ICreationElementValidator validator = AspectConfigurationFactoryRegistry.getInstance().createCreationElementValidator(actionConfiguration); +// if(validator!=null) { +// actionValidators.add(validator); +//// } else { +//// Activator.log.error("Impossible to create a creation element validator for :" + actionConfiguration, null); +// } +// } +// if(actionValidators!=null && actionValidators.size() > 0) { +// return new ComposedElementCreationValidator(actionValidators); +// } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + protected IElementMatcher createElementMatcher(AspectViewTypeConfiguration configuration) { + // these element types are there only for creation => it can not be match at any time + return new NullElementMatcher(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ConfigurationElement.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ConfigurationElement.java new file mode 100644 index 00000000000..dbd7c83abe9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ConfigurationElement.java @@ -0,0 +1,150 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Configuration Element'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getName Name}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getDescription Description}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIdentifier Identifier}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIconEntry Icon Entry}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getConfigurationElement() + * @model abstract="true" + * @generated + */ +public interface ConfigurationElement extends EObject { + + /** + * Returns the value of the 'Name' attribute. + * + *

    + * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getConfigurationElement_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getName Name}' attribute. + * + * + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Description' attribute. + * + *

    + * If the meaning of the 'Description' attribute isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getConfigurationElement_Description() + * @model + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getDescription Description}' attribute. + * + * + * + * @param value + * the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Identifier' attribute. + * + *

    + * If the meaning of the 'Identifier' attribute isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Identifier' attribute. + * @see #setIdentifier(String) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getConfigurationElement_Identifier() + * @model required="true" + * @generated + */ + String getIdentifier(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIdentifier Identifier}' attribute. + * + * + * + * @param value + * the new value of the 'Identifier' attribute. + * @see #getIdentifier() + * @generated + */ + void setIdentifier(String value); + + /** + * Returns the value of the 'Icon Entry' containment reference. + * + *

    + * If the meaning of the 'Icon Entry' containment reference isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Icon Entry' containment reference. + * @see #setIconEntry(IconEntry) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getConfigurationElement_IconEntry() + * @model containment="true" + * @generated + */ + IconEntry getIconEntry(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIconEntry Icon Entry}' containment + * reference. + * + * + * + * @param value + * the new value of the 'Icon Entry' containment reference. + * @see #getIconEntry() + * @generated + */ + void setIconEntry(IconEntry value); +} // ConfigurationElement diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeAdviceConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeAdviceConfiguration.java new file mode 100644 index 00000000000..9c7a5989f54 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeAdviceConfiguration.java @@ -0,0 +1,26 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +/** + * + * A representation of the model object 'Element Type Advice Configuration'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getElementTypeAdviceConfiguration() + * @model abstract="true" + * @generated + */ +public interface ElementTypeAdviceConfiguration extends ConfigurationElement { +} // ElementTypeAdviceConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeConfiguration.java new file mode 100644 index 00000000000..4237c52ac37 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ElementTypeConfiguration.java @@ -0,0 +1,140 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Element Type Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getHint Hint}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getKindName Kind Name}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getSpecializedTypesID Specialized Types ID}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getMatcherConfiguration Matcher Configuration}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getElementTypeConfiguration() + * @model abstract="true" + * @generated + */ +public interface ElementTypeConfiguration extends ConfigurationElement { + + /** + * Returns the value of the 'Hint' attribute. + * The default value is "ExtendedElements". + * + *

    + * If the meaning of the 'Hint' attribute isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Hint' attribute. + * @see #setHint(String) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getElementTypeConfiguration_Hint() + * @model default="ExtendedElements" + * @generated + */ + String getHint(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getHint Hint}' attribute. + * + * + * + * @param value + * the new value of the 'Hint' attribute. + * @see #getHint() + * @generated + */ + void setHint(String value); + + /** + * Returns the value of the 'Kind Name' attribute. + * The default value is "org.eclipse.gmf.runtime.emf.type.core.IHintedType". + * + *

    + * If the meaning of the 'Kind Name' attribute isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Kind Name' attribute. + * @see #setKindName(String) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getElementTypeConfiguration_KindName() + * @model default="org.eclipse.gmf.runtime.emf.type.core.IHintedType" + * @generated + */ + String getKindName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getKindName Kind Name}' attribute. + * + * + * + * @param value + * the new value of the 'Kind Name' attribute. + * @see #getKindName() + * @generated + */ + void setKindName(String value); + + /** + * Returns the value of the 'Specialized Types ID' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

    + * If the meaning of the 'Specialized Types ID' attribute list isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Specialized Types ID' attribute list. + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getElementTypeConfiguration_SpecializedTypesID() + * @model required="true" + * @generated + */ + EList getSpecializedTypesID(); + + /** + * Returns the value of the 'Matcher Configuration' containment reference. + * + *

    + * If the meaning of the 'Matcher Configuration' containment reference isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Matcher Configuration' containment reference. + * @see #setMatcherConfiguration(MatcherConfiguration) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getElementTypeConfiguration_MatcherConfiguration() + * @model containment="true" + * @generated + */ + MatcherConfiguration getMatcherConfiguration(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getMatcherConfiguration + * Matcher Configuration}' containment reference. + * + * + * + * @param value + * the new value of the 'Matcher Configuration' containment reference. + * @see #getMatcherConfiguration() + * @generated + */ + void setMatcherConfiguration(MatcherConfiguration value); +} // ElementTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeConfiguration.java deleted file mode 100644 index 8376a05bbe1..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeConfiguration.java +++ /dev/null @@ -1,261 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * - * A representation of the model object 'Extended Element Type Configuration'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getName Name}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getId Id}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getIconEntry Icon Entry}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getHint Hint}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getKindName Kind Name}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedTypesID Specialized Types ID}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPreValidation Pre Validation}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPreAction Pre Action}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPostAction Post Action}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedDiagramTypeID Specialized Diagram Type ID}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration() - * @model - * @generated - */ -public interface ExtendedElementTypeConfiguration extends EObject { - /** - * Returns the value of the 'Name' attribute. - * - *

    - * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Id' attribute. - * - *

    - * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_Id() - * @model required="true" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - - /** - * Returns the value of the 'Icon Entry' containment reference. - * - *

    - * If the meaning of the 'Icon Entry' containment reference isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Icon Entry' containment reference. - * @see #setIconEntry(IconEntry) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_IconEntry() - * @model containment="true" - * @generated - */ - IconEntry getIconEntry(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getIconEntry Icon Entry}' containment reference. - * - * - * @param value the new value of the 'Icon Entry' containment reference. - * @see #getIconEntry() - * @generated - */ - void setIconEntry(IconEntry value); - - /** - * Returns the value of the 'Hint' attribute. - * The default value is "ExtendedElements". - * - *

    - * If the meaning of the 'Hint' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Hint' attribute. - * @see #setHint(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_Hint() - * @model default="ExtendedElements" - * @generated - */ - String getHint(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getHint Hint}' attribute. - * - * - * @param value the new value of the 'Hint' attribute. - * @see #getHint() - * @generated - */ - void setHint(String value); - - /** - * Returns the value of the 'Kind Name' attribute. - * The default value is "org.eclipse.gmf.runtime.emf.type.core.IHintedType". - * - *

    - * If the meaning of the 'Kind Name' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Kind Name' attribute. - * @see #setKindName(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_KindName() - * @model default="org.eclipse.gmf.runtime.emf.type.core.IHintedType" - * @generated - */ - String getKindName(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getKindName Kind Name}' attribute. - * - * - * @param value the new value of the 'Kind Name' attribute. - * @see #getKindName() - * @generated - */ - void setKindName(String value); - - /** - * Returns the value of the 'Specialized Types ID' attribute list. - * The list contents are of type {@link java.lang.String}. - * - *

    - * If the meaning of the 'Specialized Types ID' attribute list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Specialized Types ID' attribute list. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_SpecializedTypesID() - * @model required="true" - * @generated - */ - EList getSpecializedTypesID(); - - /** - * Returns the value of the 'Pre Validation' reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration}. - * - *

    - * If the meaning of the 'Pre Validation' reference list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Pre Validation' reference list. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_PreValidation() - * @model - * @generated - */ - EList getPreValidation(); - - /** - * Returns the value of the 'Pre Action' containment reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration}. - * - *

    - * If the meaning of the 'Pre Action' containment reference list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Pre Action' containment reference list. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_PreAction() - * @model containment="true" - * @generated - */ - EList getPreAction(); - - /** - * Returns the value of the 'Post Action' containment reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration}. - * - *

    - * If the meaning of the 'Post Action' containment reference list isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Post Action' containment reference list. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_PostAction() - * @model containment="true" - * @generated - */ - EList getPostAction(); - - /** - * Returns the value of the 'Specialized Diagram Type ID' attribute. - * - *

    - * If the meaning of the 'Specialized Diagram Type ID' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Specialized Diagram Type ID' attribute. - * @see #setSpecializedDiagramTypeID(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeConfiguration_SpecializedDiagramTypeID() - * @model - * @generated - */ - String getSpecializedDiagramTypeID(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedDiagramTypeID Specialized Diagram Type ID}' attribute. - * - * - * @param value the new value of the 'Specialized Diagram Type ID' attribute. - * @see #getSpecializedDiagramTypeID() - * @generated - */ - void setSpecializedDiagramTypeID(String value); - -} // ExtendedElementTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSet.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSet.java index 4eea7c49484..b66234055e4 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSet.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSet.java @@ -1,72 +1,79 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; /** * * A representation of the model object 'Extended Element Type Set'. * - * + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getElementType Element Type}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getId Id}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getElementType Element Type}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#isExtensible Extensible}
    • *
    *

    - * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeSet() * @model * @generated */ -public interface ExtendedElementTypeSet extends EObject { +public interface ExtendedElementTypeSet extends ConfigurationElement { + /** * Returns the value of the 'Element Type' containment reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration}. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration}. * *

    - * If the meaning of the 'Element Type' containment reference list isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Element Type' containment reference list isn't clear, there really should be more of a description here... *

    * + * * @return the value of the 'Element Type' containment reference list. * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeSet_ElementType() * @model containment="true" required="true" * @generated */ - EList getElementType(); + EList getElementType(); /** - * Returns the value of the 'Id' attribute. + * Returns the value of the 'Extensible' attribute. * *

    - * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Extensible' attribute isn't clear, there really should be more of a description here... *

    * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeSet_Id() - * @model required="true" + * + * @return the value of the 'Extensible' attribute. + * @see #setExtensible(boolean) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getExtendedElementTypeSet_Extensible() + * @model * @generated */ - String getId(); + boolean isExtensible(); /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getId Id}' attribute. + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#isExtensible Extensible}' attribute. * * - * @param value the new value of the 'Id' attribute. - * @see #getId() + * + * @param value + * the new value of the 'Extensible' attribute. + * @see #isExtensible() * @generated */ - void setId(String value); - + void setExtensible(boolean value); } // ExtendedElementTypeSet diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesFactory.java index f395b7b0c55..75ab94fc226 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesFactory.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesFactory.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes; @@ -13,14 +19,17 @@ import org.eclipse.emf.ecore.EFactory; * The Factory for the model. * It provides a create method for each non-abstract class of the model. * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage * @generated */ public interface ExtendedtypesFactory extends EFactory { + /** * The singleton instance of the factory. * * + * * @generated */ ExtendedtypesFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesFactoryImpl.init(); @@ -29,36 +38,49 @@ public interface ExtendedtypesFactory extends EFactory { * Returns a new object of class 'Extended Element Type Set'. * * + * * @return a new object of class 'Extended Element Type Set'. * @generated */ ExtendedElementTypeSet createExtendedElementTypeSet(); /** - * Returns a new object of class 'Extended Element Type Configuration'. + * Returns a new object of class 'Icon Entry'. * * - * @return a new object of class 'Extended Element Type Configuration'. + * + * @return a new object of class 'Icon Entry'. * @generated */ - ExtendedElementTypeConfiguration createExtendedElementTypeConfiguration(); + IconEntry createIconEntry(); /** - * Returns a new object of class 'Icon Entry'. + * Returns a new object of class 'Aspect Semantic Type Configuration'. * * - * @return a new object of class 'Icon Entry'. + * + * @return a new object of class 'Aspect Semantic Type Configuration'. * @generated */ - IconEntry createIconEntry(); + AspectSemanticTypeConfiguration createAspectSemanticTypeConfiguration(); + + /** + * Returns a new object of class 'Aspect View Type Configuration'. + * + * + * + * @return a new object of class 'Aspect View Type Configuration'. + * @generated + */ + AspectViewTypeConfiguration createAspectViewTypeConfiguration(); /** * Returns the package supported by this factory. * * + * * @return the package supported by this factory. * @generated */ ExtendedtypesPackage getExtendedtypesPackage(); - } //ExtendedtypesFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesPackage.java index 6dba26a155e..fc51ee5c429 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesPackage.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ExtendedtypesPackage.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes; @@ -16,500 +22,1164 @@ import org.eclipse.emf.ecore.EReference; * The Package for the model. * It contains accessors for the meta objects to represent *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • *
    * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesFactory * @model kind="package" * @generated */ public interface ExtendedtypesPackage extends EPackage { + + /** + * The package name. + * + * + * + * @generated + */ + String eNAME = "extendedtypes"; //$NON-NLS-1$ + + /** + * The package namespace URI. + * + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/1.0"; //$NON-NLS-1$ + + /** + * The package namespace name. + * + * + * + * @generated + */ + String eNS_PREFIX = "extendedtypes"; //$NON-NLS-1$ + + /** + * The singleton instance of the package. + * + * + * + * @generated + */ + ExtendedtypesPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ConfigurationElementImpl Configuration Element}' + * class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ConfigurationElementImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getConfigurationElement() + * @generated + */ + int CONFIGURATION_ELEMENT = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * + * @generated + * @ordered + */ + int CONFIGURATION_ELEMENT__NAME = 0; + + /** + * The feature id for the 'Description' attribute. + * + * + * + * @generated + * @ordered + */ + int CONFIGURATION_ELEMENT__DESCRIPTION = 1; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * + * @generated + * @ordered + */ + int CONFIGURATION_ELEMENT__IDENTIFIER = 2; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * + * @generated + * @ordered + */ + int CONFIGURATION_ELEMENT__ICON_ENTRY = 3; + + /** + * The number of structural features of the 'Configuration Element' class. + * + * + * + * @generated + * @ordered + */ + int CONFIGURATION_ELEMENT_FEATURE_COUNT = 4; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl Extended Element Type Set}' + * class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getExtendedElementTypeSet() + * @generated + */ + int EXTENDED_ELEMENT_TYPE_SET = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET__NAME = CONFIGURATION_ELEMENT__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET__DESCRIPTION = CONFIGURATION_ELEMENT__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET__IDENTIFIER = CONFIGURATION_ELEMENT__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET__ICON_ENTRY = CONFIGURATION_ELEMENT__ICON_ENTRY; + + /** + * The feature id for the 'Element Type' containment reference list. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE = CONFIGURATION_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Extensible' attribute. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE = CONFIGURATION_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Extended Element Type Set' class. + * + * + * + * @generated + * @ordered + */ + int EXTENDED_ELEMENT_TYPE_SET_FEATURE_COUNT = CONFIGURATION_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeConfigurationImpl + * Element Type Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getElementTypeConfiguration() + * @generated + */ + int ELEMENT_TYPE_CONFIGURATION = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__NAME = CONFIGURATION_ELEMENT__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__DESCRIPTION = CONFIGURATION_ELEMENT__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__IDENTIFIER = CONFIGURATION_ELEMENT__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY = CONFIGURATION_ELEMENT__ICON_ENTRY; + + /** + * The feature id for the 'Hint' attribute. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__HINT = CONFIGURATION_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Kind Name' attribute. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__KIND_NAME = CONFIGURATION_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Specialized Types ID' attribute list. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = CONFIGURATION_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Matcher Configuration' containment reference. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION = CONFIGURATION_ELEMENT_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Element Type Configuration' class. + * + * + * + * @generated + * @ordered + */ + int ELEMENT_TYPE_CONFIGURATION_FEATURE_COUNT = CONFIGURATION_ELEMENT_FEATURE_COUNT + 4; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl Icon Entry}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getIconEntry() + * @generated + */ + int ICON_ENTRY = 2; + + /** + * The feature id for the 'Icon Path' attribute. + * + * + * + * @generated + * @ordered + */ + int ICON_ENTRY__ICON_PATH = 0; + + /** + * The feature id for the 'Bundle Id' attribute. + * + * + * + * @generated + * @ordered + */ + int ICON_ENTRY__BUNDLE_ID = 1; + + /** + * The number of structural features of the 'Icon Entry' class. + * + * + * + * @generated + * @ordered + */ + int ICON_ENTRY_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.MatcherConfigurationImpl Matcher Configuration}' + * class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.MatcherConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getMatcherConfiguration() + * @generated + */ + int MATCHER_CONFIGURATION = 4; + + /** + * The number of structural features of the 'Matcher Configuration' class. + * + * + * + * @generated + * @ordered + */ + int MATCHER_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl Action Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getActionConfiguration() + * @generated + */ + int ACTION_CONFIGURATION = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * + * @generated + * @ordered + */ + int ACTION_CONFIGURATION__NAME = CONFIGURATION_ELEMENT__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * + * @generated + * @ordered + */ + int ACTION_CONFIGURATION__DESCRIPTION = CONFIGURATION_ELEMENT__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * + * @generated + * @ordered + */ + int ACTION_CONFIGURATION__IDENTIFIER = CONFIGURATION_ELEMENT__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * + * @generated + * @ordered + */ + int ACTION_CONFIGURATION__ICON_ENTRY = CONFIGURATION_ELEMENT__ICON_ENTRY; + + /** + * The number of structural features of the 'Action Configuration' class. + * + * + * + * @generated + * @ordered + */ + int ACTION_CONFIGURATION_FEATURE_COUNT = CONFIGURATION_ELEMENT_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ViewActionConfigurationImpl View Action Configuration} + * ' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ViewActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getViewActionConfiguration() + * @generated + */ + int VIEW_ACTION_CONFIGURATION = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * + * @generated + * @ordered + */ + int VIEW_ACTION_CONFIGURATION__NAME = ACTION_CONFIGURATION__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * + * @generated + * @ordered + */ + int VIEW_ACTION_CONFIGURATION__DESCRIPTION = ACTION_CONFIGURATION__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * + * @generated + * @ordered + */ + int VIEW_ACTION_CONFIGURATION__IDENTIFIER = ACTION_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * + * @generated + * @ordered + */ + int VIEW_ACTION_CONFIGURATION__ICON_ENTRY = ACTION_CONFIGURATION__ICON_ENTRY; + + /** + * The number of structural features of the 'View Action Configuration' class. + * + * + * + * @generated + * @ordered + */ + int VIEW_ACTION_CONFIGURATION_FEATURE_COUNT = ACTION_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl + * Semantic Action Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getSemanticActionConfiguration() + * @generated + */ + int SEMANTIC_ACTION_CONFIGURATION = 7; + /** - * The package name. + * The feature id for the 'Name' attribute. * * + * * @generated + * @ordered */ - String eNAME = "extendedtypes"; + int SEMANTIC_ACTION_CONFIGURATION__NAME = ACTION_CONFIGURATION__NAME; /** - * The package namespace URI. + * The feature id for the 'Description' attribute. * * + * * @generated + * @ordered */ - String eNS_URI = "http://www.eclipse.org/papyrus/diagram/types/extendedtypes/0.7"; + int SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION = ACTION_CONFIGURATION__DESCRIPTION; /** - * The package namespace name. + * The feature id for the 'Identifier' attribute. * * + * * @generated + * @ordered */ - String eNS_PREFIX = "extendedtypes"; + int SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER = ACTION_CONFIGURATION__IDENTIFIER; /** - * The singleton instance of the package. + * The feature id for the 'Icon Entry' containment reference. * * + * * @generated + * @ordered */ - ExtendedtypesPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl.init(); + int SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY = ACTION_CONFIGURATION__ICON_ENTRY; /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl Extended Element Type Set}' class. + * The number of structural features of the 'Semantic Action Configuration' class. * * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getExtendedElementTypeSet() + * * @generated + * @ordered */ - int EXTENDED_ELEMENT_TYPE_SET = 0; + int SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT = ACTION_CONFIGURATION_FEATURE_COUNT + 0; /** - * The feature id for the 'Element Type' containment reference list. + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.SemanticTypeConfigurationImpl + * Semantic Type Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.SemanticTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getSemanticTypeConfiguration() + * @generated + */ + int SEMANTIC_TYPE_CONFIGURATION = 8; + + /** + * The feature id for the 'Name' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE = 0; + int SEMANTIC_TYPE_CONFIGURATION__NAME = ELEMENT_TYPE_CONFIGURATION__NAME; /** - * The feature id for the 'Id' attribute. + * The feature id for the 'Description' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_SET__ID = 1; + int SEMANTIC_TYPE_CONFIGURATION__DESCRIPTION = ELEMENT_TYPE_CONFIGURATION__DESCRIPTION; /** - * The number of structural features of the 'Extended Element Type Set' class. + * The feature id for the 'Identifier' attribute. + * + * + * + * @generated + * @ordered + */ + int SEMANTIC_TYPE_CONFIGURATION__IDENTIFIER = ELEMENT_TYPE_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * + * @generated + * @ordered + */ + int SEMANTIC_TYPE_CONFIGURATION__ICON_ENTRY = ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY; + + /** + * The feature id for the 'Hint' attribute. + * + * + * + * @generated + * @ordered + */ + int SEMANTIC_TYPE_CONFIGURATION__HINT = ELEMENT_TYPE_CONFIGURATION__HINT; + + /** + * The feature id for the 'Kind Name' attribute. + * + * + * + * @generated + * @ordered + */ + int SEMANTIC_TYPE_CONFIGURATION__KIND_NAME = ELEMENT_TYPE_CONFIGURATION__KIND_NAME; + + /** + * The feature id for the 'Specialized Types ID' attribute list. + * + * + * + * @generated + * @ordered + */ + int SEMANTIC_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID; + + /** + * The feature id for the 'Matcher Configuration' containment reference. + * + * + * + * @generated + * @ordered + */ + int SEMANTIC_TYPE_CONFIGURATION__MATCHER_CONFIGURATION = ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION; + + /** + * The number of structural features of the 'Semantic Type Configuration' class. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_SET_FEATURE_COUNT = 2; + int SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT = ELEMENT_TYPE_CONFIGURATION_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl Extended Element Type Configuration}' class. + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ViewTypeConfigurationImpl View Type Configuration}' + * class. * * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getExtendedElementTypeConfiguration() + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ViewTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getViewTypeConfiguration() * @generated */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION = 1; + int VIEW_TYPE_CONFIGURATION = 9; /** * The feature id for the 'Name' attribute. * * + * + * @generated + * @ordered + */ + int VIEW_TYPE_CONFIGURATION__NAME = ELEMENT_TYPE_CONFIGURATION__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME = 0; + int VIEW_TYPE_CONFIGURATION__DESCRIPTION = ELEMENT_TYPE_CONFIGURATION__DESCRIPTION; /** - * The feature id for the 'Id' attribute. + * The feature id for the 'Identifier' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID = 1; + int VIEW_TYPE_CONFIGURATION__IDENTIFIER = ELEMENT_TYPE_CONFIGURATION__IDENTIFIER; /** * The feature id for the 'Icon Entry' containment reference. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY = 2; + int VIEW_TYPE_CONFIGURATION__ICON_ENTRY = ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY; /** * The feature id for the 'Hint' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT = 3; + int VIEW_TYPE_CONFIGURATION__HINT = ELEMENT_TYPE_CONFIGURATION__HINT; /** * The feature id for the 'Kind Name' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME = 4; + int VIEW_TYPE_CONFIGURATION__KIND_NAME = ELEMENT_TYPE_CONFIGURATION__KIND_NAME; /** * The feature id for the 'Specialized Types ID' attribute list. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = 5; + int VIEW_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID; /** - * The feature id for the 'Pre Validation' reference list. + * The feature id for the 'Matcher Configuration' containment reference. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION = 6; + int VIEW_TYPE_CONFIGURATION__MATCHER_CONFIGURATION = ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION; /** - * The feature id for the 'Pre Action' containment reference list. + * The feature id for the 'Specialized Diagram Type ID' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION = 7; + int VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID = ELEMENT_TYPE_CONFIGURATION_FEATURE_COUNT + 0; /** - * The feature id for the 'Post Action' containment reference list. + * The number of structural features of the 'View Type Configuration' class. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION = 8; + int VIEW_TYPE_CONFIGURATION_FEATURE_COUNT = ELEMENT_TYPE_CONFIGURATION_FEATURE_COUNT + 1; /** - * The feature id for the 'Specialized Diagram Type ID' attribute. + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeAdviceConfigurationImpl + * Element Type Advice Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeAdviceConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getElementTypeAdviceConfiguration() + * @generated + */ + int ELEMENT_TYPE_ADVICE_CONFIGURATION = 10; + + /** + * The feature id for the 'Name' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID = 9; + int ELEMENT_TYPE_ADVICE_CONFIGURATION__NAME = CONFIGURATION_ELEMENT__NAME; /** - * The number of structural features of the 'Extended Element Type Configuration' class. + * The feature id for the 'Description' attribute. * * + * * @generated * @ordered */ - int EXTENDED_ELEMENT_TYPE_CONFIGURATION_FEATURE_COUNT = 10; + int ELEMENT_TYPE_ADVICE_CONFIGURATION__DESCRIPTION = CONFIGURATION_ELEMENT__DESCRIPTION; /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl Icon Entry}' class. + * The feature id for the 'Identifier' attribute. * * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getIconEntry() + * * @generated + * @ordered */ - int ICON_ENTRY = 2; + int ELEMENT_TYPE_ADVICE_CONFIGURATION__IDENTIFIER = CONFIGURATION_ELEMENT__IDENTIFIER; /** - * The feature id for the 'Icon Path' attribute. + * The feature id for the 'Icon Entry' containment reference. * * + * * @generated * @ordered */ - int ICON_ENTRY__ICON_PATH = 0; + int ELEMENT_TYPE_ADVICE_CONFIGURATION__ICON_ENTRY = CONFIGURATION_ELEMENT__ICON_ENTRY; /** - * The feature id for the 'Bundle Id' attribute. + * The number of structural features of the 'Element Type Advice Configuration' class. * * + * * @generated * @ordered */ - int ICON_ENTRY__BUNDLE_ID = 1; + int ELEMENT_TYPE_ADVICE_CONFIGURATION_FEATURE_COUNT = CONFIGURATION_ELEMENT_FEATURE_COUNT + 0; /** - * The number of structural features of the 'Icon Entry' class. + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.AspectSemanticTypeConfigurationImpl + * Aspect Semantic Type Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.AspectSemanticTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getAspectSemanticTypeConfiguration() + * @generated + */ + int ASPECT_SEMANTIC_TYPE_CONFIGURATION = 11; + + /** + * The feature id for the 'Name' attribute. * * + * * @generated * @ordered */ - int ICON_ENTRY_FEATURE_COUNT = 2; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__NAME = SEMANTIC_TYPE_CONFIGURATION__NAME; /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl Action Configuration}' class. + * The feature id for the 'Description' attribute. * * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getActionConfiguration() + * * @generated + * @ordered */ - int ACTION_CONFIGURATION = 3; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__DESCRIPTION = SEMANTIC_TYPE_CONFIGURATION__DESCRIPTION; /** - * The feature id for the 'Label' attribute. + * The feature id for the 'Identifier' attribute. * * + * * @generated * @ordered */ - int ACTION_CONFIGURATION__LABEL = 0; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__IDENTIFIER = SEMANTIC_TYPE_CONFIGURATION__IDENTIFIER; /** - * The feature id for the 'Id' attribute. + * The feature id for the 'Icon Entry' containment reference. * * + * * @generated * @ordered */ - int ACTION_CONFIGURATION__ID = 1; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__ICON_ENTRY = SEMANTIC_TYPE_CONFIGURATION__ICON_ENTRY; /** - * The number of structural features of the 'Action Configuration' class. + * The feature id for the 'Hint' attribute. + * + * + * + * @generated + * @ordered + */ + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__HINT = SEMANTIC_TYPE_CONFIGURATION__HINT; + + /** + * The feature id for the 'Kind Name' attribute. * * + * * @generated * @ordered */ - int ACTION_CONFIGURATION_FEATURE_COUNT = 2; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__KIND_NAME = SEMANTIC_TYPE_CONFIGURATION__KIND_NAME; /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.PreActionConfigurationImpl Pre Action Configuration}' class. + * The feature id for the 'Specialized Types ID' attribute list. * * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.PreActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getPreActionConfiguration() + * * @generated + * @ordered */ - int PRE_ACTION_CONFIGURATION = 4; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = SEMANTIC_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID; /** - * The feature id for the 'Label' attribute. + * The feature id for the 'Matcher Configuration' containment reference. * * + * * @generated * @ordered */ - int PRE_ACTION_CONFIGURATION__LABEL = ACTION_CONFIGURATION__LABEL; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__MATCHER_CONFIGURATION = SEMANTIC_TYPE_CONFIGURATION__MATCHER_CONFIGURATION; /** - * The feature id for the 'Id' attribute. + * The feature id for the 'Action Configuration' containment reference list. * * + * * @generated * @ordered */ - int PRE_ACTION_CONFIGURATION__ID = ACTION_CONFIGURATION__ID; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION = SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT + 0; /** - * The number of structural features of the 'Pre Action Configuration' class. + * The number of structural features of the 'Aspect Semantic Type Configuration' class. * * + * * @generated * @ordered */ - int PRE_ACTION_CONFIGURATION_FEATURE_COUNT = ACTION_CONFIGURATION_FEATURE_COUNT + 0; + int ASPECT_SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT = SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.AspectViewTypeConfigurationImpl + * Aspect View Type Configuration}' class. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.impl.AspectViewTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getAspectViewTypeConfiguration() + * @generated + */ + int ASPECT_VIEW_TYPE_CONFIGURATION = 12; /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.PostActionConfigurationImpl Post Action Configuration}' class. + * The feature id for the 'Name' attribute. * * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.PostActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getPostActionConfiguration() + * * @generated + * @ordered */ - int POST_ACTION_CONFIGURATION = 5; + int ASPECT_VIEW_TYPE_CONFIGURATION__NAME = VIEW_TYPE_CONFIGURATION__NAME; /** - * The feature id for the 'Label' attribute. + * The feature id for the 'Description' attribute. * * + * * @generated * @ordered */ - int POST_ACTION_CONFIGURATION__LABEL = ACTION_CONFIGURATION__LABEL; + int ASPECT_VIEW_TYPE_CONFIGURATION__DESCRIPTION = VIEW_TYPE_CONFIGURATION__DESCRIPTION; /** - * The feature id for the 'Id' attribute. + * The feature id for the 'Identifier' attribute. * * + * * @generated * @ordered */ - int POST_ACTION_CONFIGURATION__ID = ACTION_CONFIGURATION__ID; + int ASPECT_VIEW_TYPE_CONFIGURATION__IDENTIFIER = VIEW_TYPE_CONFIGURATION__IDENTIFIER; /** - * The number of structural features of the 'Post Action Configuration' class. + * The feature id for the 'Icon Entry' containment reference. * * + * * @generated * @ordered */ - int POST_ACTION_CONFIGURATION_FEATURE_COUNT = ACTION_CONFIGURATION_FEATURE_COUNT + 0; + int ASPECT_VIEW_TYPE_CONFIGURATION__ICON_ENTRY = VIEW_TYPE_CONFIGURATION__ICON_ENTRY; + /** + * The feature id for the 'Hint' attribute. + * + * + * + * @generated + * @ordered + */ + int ASPECT_VIEW_TYPE_CONFIGURATION__HINT = VIEW_TYPE_CONFIGURATION__HINT; /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet Extended Element Type Set}'. + * The feature id for the 'Kind Name' attribute. * * - * @return the meta object for class 'Extended Element Type Set'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet + * * @generated + * @ordered */ - EClass getExtendedElementTypeSet(); + int ASPECT_VIEW_TYPE_CONFIGURATION__KIND_NAME = VIEW_TYPE_CONFIGURATION__KIND_NAME; /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getElementType Element Type}'. + * The feature id for the 'Specialized Types ID' attribute list. * * - * @return the meta object for the containment reference list 'Element Type'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getElementType() - * @see #getExtendedElementTypeSet() + * * @generated + * @ordered */ - EReference getExtendedElementTypeSet_ElementType(); + int ASPECT_VIEW_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = VIEW_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID; /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getId Id}'. + * The feature id for the 'Matcher Configuration' containment reference. * * - * @return the meta object for the attribute 'Id'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getId() - * @see #getExtendedElementTypeSet() + * * @generated + * @ordered */ - EAttribute getExtendedElementTypeSet_Id(); + int ASPECT_VIEW_TYPE_CONFIGURATION__MATCHER_CONFIGURATION = VIEW_TYPE_CONFIGURATION__MATCHER_CONFIGURATION; /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration Extended Element Type Configuration}'. + * The feature id for the 'Specialized Diagram Type ID' attribute. * * - * @return the meta object for class 'Extended Element Type Configuration'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration + * * @generated + * @ordered */ - EClass getExtendedElementTypeConfiguration(); + int ASPECT_VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID = VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID; /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getName Name}'. + * The feature id for the 'Action Configuration' containment reference list. * * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getName() - * @see #getExtendedElementTypeConfiguration() + * * @generated + * @ordered */ - EAttribute getExtendedElementTypeConfiguration_Name(); + int ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION = VIEW_TYPE_CONFIGURATION_FEATURE_COUNT + 0; /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getId Id}'. + * The number of structural features of the 'Aspect View Type Configuration' class. * * - * @return the meta object for the attribute 'Id'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getId() - * @see #getExtendedElementTypeConfiguration() + * * @generated + * @ordered */ - EAttribute getExtendedElementTypeConfiguration_Id(); + int ASPECT_VIEW_TYPE_CONFIGURATION_FEATURE_COUNT = VIEW_TYPE_CONFIGURATION_FEATURE_COUNT + 1; /** - * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getIconEntry Icon Entry}'. + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet Extended Element Type Set}'. * * - * @return the meta object for the containment reference 'Icon Entry'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getIconEntry() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for class 'Extended Element Type Set'. + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet * @generated */ - EReference getExtendedElementTypeConfiguration_IconEntry(); + EClass getExtendedElementTypeSet(); /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getHint Hint}'. + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getElementType Element Type}'. * * - * @return the meta object for the attribute 'Hint'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getHint() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for the containment reference list 'Element Type'. + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#getElementType() + * @see #getExtendedElementTypeSet() * @generated */ - EAttribute getExtendedElementTypeConfiguration_Hint(); + EReference getExtendedElementTypeSet_ElementType(); /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getKindName Kind Name}'. + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#isExtensible + * Extensible}'. * * - * @return the meta object for the attribute 'Kind Name'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getKindName() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for the attribute 'Extensible'. + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet#isExtensible() + * @see #getExtendedElementTypeSet() * @generated */ - EAttribute getExtendedElementTypeConfiguration_KindName(); + EAttribute getExtendedElementTypeSet_Extensible(); /** - * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedTypesID Specialized Types ID}'. + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration Element Type Configuration} + * '. * * - * @return the meta object for the attribute list 'Specialized Types ID'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedTypesID() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for class 'Element Type Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration * @generated */ - EAttribute getExtendedElementTypeConfiguration_SpecializedTypesID(); + EClass getElementTypeConfiguration(); /** - * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPreValidation Pre Validation}'. + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getHint Hint}'. * * - * @return the meta object for the reference list 'Pre Validation'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPreValidation() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for the attribute 'Hint'. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getHint() + * @see #getElementTypeConfiguration() * @generated */ - EReference getExtendedElementTypeConfiguration_PreValidation(); + EAttribute getElementTypeConfiguration_Hint(); /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPreAction Pre Action}'. + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getKindName + * Kind Name}'. * * - * @return the meta object for the containment reference list 'Pre Action'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPreAction() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for the attribute 'Kind Name'. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getKindName() + * @see #getElementTypeConfiguration() * @generated */ - EReference getExtendedElementTypeConfiguration_PreAction(); + EAttribute getElementTypeConfiguration_KindName(); /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPostAction Post Action}'. + * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getSpecializedTypesID + * Specialized Types ID}'. * * - * @return the meta object for the containment reference list 'Post Action'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getPostAction() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for the attribute list 'Specialized Types ID'. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getSpecializedTypesID() + * @see #getElementTypeConfiguration() * @generated */ - EReference getExtendedElementTypeConfiguration_PostAction(); + EAttribute getElementTypeConfiguration_SpecializedTypesID(); /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedDiagramTypeID Specialized Diagram Type ID}'. + * Returns the meta object for the containment reference ' + * {@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getMatcherConfiguration Matcher Configuration}'. * * - * @return the meta object for the attribute 'Specialized Diagram Type ID'. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration#getSpecializedDiagramTypeID() - * @see #getExtendedElementTypeConfiguration() + * + * @return the meta object for the containment reference 'Matcher Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration#getMatcherConfiguration() + * @see #getElementTypeConfiguration() * @generated */ - EAttribute getExtendedElementTypeConfiguration_SpecializedDiagramTypeID(); + EReference getElementTypeConfiguration_MatcherConfiguration(); /** * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.IconEntry Icon Entry}'. * * + * * @return the meta object for class 'Icon Entry'. * @see org.eclipse.papyrus.infra.extendedtypes.IconEntry * @generated @@ -520,6 +1190,7 @@ public interface ExtendedtypesPackage extends EPackage { * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getIconPath Icon Path}'. * * + * * @return the meta object for the attribute 'Icon Path'. * @see org.eclipse.papyrus.infra.extendedtypes.IconEntry#getIconPath() * @see #getIconEntry() @@ -531,6 +1202,7 @@ public interface ExtendedtypesPackage extends EPackage { * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getBundleId Bundle Id}'. * * + * * @return the meta object for the attribute 'Bundle Id'. * @see org.eclipse.papyrus.infra.extendedtypes.IconEntry#getBundleId() * @see #getIconEntry() @@ -538,10 +1210,84 @@ public interface ExtendedtypesPackage extends EPackage { */ EAttribute getIconEntry_BundleId(); + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element}'. + * + * + * + * @return the meta object for class 'Configuration Element'. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + EClass getConfigurationElement(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getName Name}'. + * + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getName() + * @see #getConfigurationElement() + * @generated + */ + EAttribute getConfigurationElement_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getDescription + * Description}'. + * + * + * + * @return the meta object for the attribute 'Description'. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getDescription() + * @see #getConfigurationElement() + * @generated + */ + EAttribute getConfigurationElement_Description(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIdentifier + * Identifier}'. + * + * + * + * @return the meta object for the attribute 'Identifier'. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIdentifier() + * @see #getConfigurationElement() + * @generated + */ + EAttribute getConfigurationElement_Identifier(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIconEntry + * Icon Entry}'. + * + * + * + * @return the meta object for the containment reference 'Icon Entry'. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement#getIconEntry() + * @see #getConfigurationElement() + * @generated + */ + EReference getConfigurationElement_IconEntry(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration Matcher Configuration}'. + * + * + * + * @return the meta object for class 'Matcher Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration + * @generated + */ + EClass getMatcherConfiguration(); + /** * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. * * + * * @return the meta object for class 'Action Configuration'. * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration * @generated @@ -549,257 +1295,133 @@ public interface ExtendedtypesPackage extends EPackage { EClass getActionConfiguration(); /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getLabel Label}'. + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration View Action Configuration}'. * * - * @return the meta object for the attribute 'Label'. - * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getLabel() - * @see #getActionConfiguration() + * + * @return the meta object for class 'View Action Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration * @generated */ - EAttribute getActionConfiguration_Label(); + EClass getViewActionConfiguration(); /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getId Id}'. + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration + * Semantic Action Configuration}'. * * - * @return the meta object for the attribute 'Id'. - * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration#getId() - * @see #getActionConfiguration() + * + * @return the meta object for class 'Semantic Action Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration * @generated */ - EAttribute getActionConfiguration_Id(); + EClass getSemanticActionConfiguration(); /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration Pre Action Configuration}'. + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration + * Semantic Type Configuration}'. * * - * @return the meta object for class 'Pre Action Configuration'. - * @see org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration + * + * @return the meta object for class 'Semantic Type Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration * @generated */ - EClass getPreActionConfiguration(); + EClass getSemanticTypeConfiguration(); /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration Post Action Configuration}'. + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration View Type Configuration}'. * * - * @return the meta object for class 'Post Action Configuration'. - * @see org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration + * + * @return the meta object for class 'View Type Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration * @generated */ - EClass getPostActionConfiguration(); + EClass getViewTypeConfiguration(); /** - * Returns the factory that creates the instances of the model. + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration#getSpecializedDiagramTypeID + * Specialized Diagram Type ID}'. * * - * @return the factory that creates the instances of the model. + * + * @return the meta object for the attribute 'Specialized Diagram Type ID'. + * @see org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration#getSpecializedDiagramTypeID() + * @see #getViewTypeConfiguration() * @generated */ - ExtendedtypesFactory getExtendedtypesFactory(); + EAttribute getViewTypeConfiguration_SpecializedDiagramTypeID(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration + * Element Type Advice Configuration}'. + * + * + * + * @return the meta object for class 'Element Type Advice Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration + * @generated + */ + EClass getElementTypeAdviceConfiguration(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration + * Aspect Semantic Type Configuration}'. + * + * + * + * @return the meta object for class 'Aspect Semantic Type Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration + * @generated + */ + EClass getAspectSemanticTypeConfiguration(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration#getActionConfiguration Action Configuration}'. + * + * + * + * @return the meta object for the containment reference list 'Action Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration#getActionConfiguration() + * @see #getAspectSemanticTypeConfiguration() + * @generated + */ + EReference getAspectSemanticTypeConfiguration_ActionConfiguration(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration + * Aspect View Type Configuration}'. + * + * + * + * @return the meta object for class 'Aspect View Type Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration + * @generated + */ + EClass getAspectViewTypeConfiguration(); /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration#getActionConfiguration Action Configuration}'. * - * Defines literals for the meta objects that represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl Extended Element Type Set}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getExtendedElementTypeSet() - * @generated - */ - EClass EXTENDED_ELEMENT_TYPE_SET = eINSTANCE.getExtendedElementTypeSet(); - - /** - * The meta object literal for the 'Element Type' containment reference list feature. - * - * - * @generated - */ - EReference EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE = eINSTANCE.getExtendedElementTypeSet_ElementType(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_SET__ID = eINSTANCE.getExtendedElementTypeSet_Id(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl Extended Element Type Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getExtendedElementTypeConfiguration() - * @generated - */ - EClass EXTENDED_ELEMENT_TYPE_CONFIGURATION = eINSTANCE.getExtendedElementTypeConfiguration(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME = eINSTANCE.getExtendedElementTypeConfiguration_Name(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID = eINSTANCE.getExtendedElementTypeConfiguration_Id(); - - /** - * The meta object literal for the 'Icon Entry' containment reference feature. - * - * - * @generated - */ - EReference EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY = eINSTANCE.getExtendedElementTypeConfiguration_IconEntry(); - - /** - * The meta object literal for the 'Hint' attribute feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT = eINSTANCE.getExtendedElementTypeConfiguration_Hint(); - - /** - * The meta object literal for the 'Kind Name' attribute feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME = eINSTANCE.getExtendedElementTypeConfiguration_KindName(); - - /** - * The meta object literal for the 'Specialized Types ID' attribute list feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = eINSTANCE.getExtendedElementTypeConfiguration_SpecializedTypesID(); - - /** - * The meta object literal for the 'Pre Validation' reference list feature. - * - * - * @generated - */ - EReference EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION = eINSTANCE.getExtendedElementTypeConfiguration_PreValidation(); - - /** - * The meta object literal for the 'Pre Action' containment reference list feature. - * - * - * @generated - */ - EReference EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION = eINSTANCE.getExtendedElementTypeConfiguration_PreAction(); - - /** - * The meta object literal for the 'Post Action' containment reference list feature. - * - * - * @generated - */ - EReference EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION = eINSTANCE.getExtendedElementTypeConfiguration_PostAction(); - - /** - * The meta object literal for the 'Specialized Diagram Type ID' attribute feature. - * - * - * @generated - */ - EAttribute EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID = eINSTANCE.getExtendedElementTypeConfiguration_SpecializedDiagramTypeID(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl Icon Entry}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getIconEntry() - * @generated - */ - EClass ICON_ENTRY = eINSTANCE.getIconEntry(); - - /** - * The meta object literal for the 'Icon Path' attribute feature. - * - * - * @generated - */ - EAttribute ICON_ENTRY__ICON_PATH = eINSTANCE.getIconEntry_IconPath(); - - /** - * The meta object literal for the 'Bundle Id' attribute feature. - * - * - * @generated - */ - EAttribute ICON_ENTRY__BUNDLE_ID = eINSTANCE.getIconEntry_BundleId(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl Action Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getActionConfiguration() - * @generated - */ - EClass ACTION_CONFIGURATION = eINSTANCE.getActionConfiguration(); - - /** - * The meta object literal for the 'Label' attribute feature. - * - * - * @generated - */ - EAttribute ACTION_CONFIGURATION__LABEL = eINSTANCE.getActionConfiguration_Label(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute ACTION_CONFIGURATION__ID = eINSTANCE.getActionConfiguration_Id(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.PreActionConfigurationImpl Pre Action Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.PreActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getPreActionConfiguration() - * @generated - */ - EClass PRE_ACTION_CONFIGURATION = eINSTANCE.getPreActionConfiguration(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.impl.PostActionConfigurationImpl Post Action Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.impl.PostActionConfigurationImpl - * @see org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedtypesPackageImpl#getPostActionConfiguration() - * @generated - */ - EClass POST_ACTION_CONFIGURATION = eINSTANCE.getPostActionConfiguration(); - - } + * + * + * @return the meta object for the containment reference list 'Action Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration#getActionConfiguration() + * @see #getAspectViewTypeConfiguration() + * @generated + */ + EReference getAspectViewTypeConfiguration_ActionConfiguration(); + /** + * Returns the factory that creates the instances of the model. + * + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ExtendedtypesFactory getExtendedtypesFactory(); } //ExtendedtypesPackage diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/IconEntry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/IconEntry.java index 821a7f03939..8fcd09daa10 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/IconEntry.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/IconEntry.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes; @@ -12,28 +18,29 @@ import org.eclipse.emf.ecore.EObject; * * A representation of the model object 'Icon Entry'. * - * + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getIconPath Icon Path}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getBundleId Bundle Id}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getIconPath Icon Path}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getBundleId Bundle Id}
    • *
    *

    - * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getIconEntry() * @model * @generated */ public interface IconEntry extends EObject { + /** * Returns the value of the 'Icon Path' attribute. * *

    - * If the meaning of the 'Icon Path' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Icon Path' attribute isn't clear, there really should be more of a description here... *

    * + * * @return the value of the 'Icon Path' attribute. * @see #setIconPath(String) * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getIconEntry_IconPath() @@ -46,7 +53,9 @@ public interface IconEntry extends EObject { * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getIconPath Icon Path}' attribute. * * - * @param value the new value of the 'Icon Path' attribute. + * + * @param value + * the new value of the 'Icon Path' attribute. * @see #getIconPath() * @generated */ @@ -56,10 +65,10 @@ public interface IconEntry extends EObject { * Returns the value of the 'Bundle Id' attribute. * *

    - * If the meaning of the 'Bundle Id' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Bundle Id' attribute isn't clear, there really should be more of a description here... *

    * + * * @return the value of the 'Bundle Id' attribute. * @see #setBundleId(String) * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getIconEntry_BundleId() @@ -72,10 +81,11 @@ public interface IconEntry extends EObject { * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.IconEntry#getBundleId Bundle Id}' attribute. * * - * @param value the new value of the 'Bundle Id' attribute. + * + * @param value + * the new value of the 'Bundle Id' attribute. * @see #getBundleId() * @generated */ void setBundleId(String value); - } // IconEntry diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/MatcherConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/MatcherConfiguration.java new file mode 100644 index 00000000000..12554c63538 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/MatcherConfiguration.java @@ -0,0 +1,28 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Matcher Configuration'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getMatcherConfiguration() + * @model abstract="true" + * @generated + */ +public interface MatcherConfiguration extends EObject { +} // MatcherConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PostActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PostActionConfiguration.java deleted file mode 100644 index 176d3995b88..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PostActionConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes; - - -/** - * - * A representation of the model object 'Post Action Configuration'. - * - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getPostActionConfiguration() - * @model abstract="true" - * @generated - */ -public interface PostActionConfiguration extends ActionConfiguration { -} // PostActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PreActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PreActionConfiguration.java deleted file mode 100644 index 23ac073d44b..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/PreActionConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes; - - -/** - * - * A representation of the model object 'Pre Action Configuration'. - * - * - * - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getPreActionConfiguration() - * @model abstract="true" - * @generated - */ -public interface PreActionConfiguration extends ActionConfiguration { -} // PreActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticActionConfiguration.java new file mode 100644 index 00000000000..9b56f6e8d23 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticActionConfiguration.java @@ -0,0 +1,26 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +/** + * + * A representation of the model object 'Semantic Action Configuration'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getSemanticActionConfiguration() + * @model abstract="true" + * @generated + */ +public interface SemanticActionConfiguration extends ActionConfiguration { +} // SemanticActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticTypeConfiguration.java new file mode 100644 index 00000000000..830a05a7cfb --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/SemanticTypeConfiguration.java @@ -0,0 +1,30 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +/** + * + * A representation of the model object 'Semantic Type Configuration'. + * + * + * + * Configuration specific to element types registered to manipulate Domain Specific elements. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getSemanticTypeConfiguration() + * @model abstract="true" + * @generated + */ +public interface SemanticTypeConfiguration extends ElementTypeConfiguration { +} // SemanticTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewActionConfiguration.java new file mode 100644 index 00000000000..98ff9fcdc46 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewActionConfiguration.java @@ -0,0 +1,26 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +/** + * + * A representation of the model object 'View Action Configuration'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getViewActionConfiguration() + * @model abstract="true" + * @generated + */ +public interface ViewActionConfiguration extends ActionConfiguration { +} // ViewActionConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewTypeConfiguration.java new file mode 100644 index 00000000000..39a1cfa24e5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/ViewTypeConfiguration.java @@ -0,0 +1,65 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes; + +/** + * + * A representation of the model object 'View Type Configuration'. + * + * + * + * Configuration specific to element types registered to manipulate graphical elements in GMF diagrams + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration#getSpecializedDiagramTypeID Specialized Diagram Type ID}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getViewTypeConfiguration() + * @model abstract="true" + * @generated + */ +public interface ViewTypeConfiguration extends ElementTypeConfiguration { + + /** + * Returns the value of the 'Specialized Diagram Type ID' attribute. + * + *

    + * If the meaning of the 'Specialized Diagram Type ID' attribute isn't clear, there really should be more of a description here... + *

    + * + * + * @return the value of the 'Specialized Diagram Type ID' attribute. + * @see #setSpecializedDiagramTypeID(String) + * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#getViewTypeConfiguration_SpecializedDiagramTypeID() + * @model + * @generated + */ + String getSpecializedDiagramTypeID(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration#getSpecializedDiagramTypeID + * Specialized Diagram Type ID}' attribute. + * + * + * + * @param value + * the new value of the 'Specialized Diagram Type ID' attribute. + * @see #getSpecializedDiagramTypeID() + * @generated + */ + void setSpecializedDiagramTypeID(String value); +} // ViewTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ActionConfigurationImpl.java index e3ccce2adbb..96a9541ba05 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ActionConfigurationImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ActionConfigurationImpl.java @@ -1,15 +1,19 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.impl; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; + import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; @@ -18,59 +22,16 @@ import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; * An implementation of the model object 'Action Configuration'. * *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl#getLabel Label}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ActionConfigurationImpl#getId Id}
    • - *
    *

    - * + * * @generated */ -public abstract class ActionConfigurationImpl extends EObjectImpl implements ActionConfiguration { - /** - * The default value of the '{@link #getLabel() Label}' attribute. - * - * - * @see #getLabel() - * @generated - * @ordered - */ - protected static final String LABEL_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLabel() Label}' attribute. - * - * - * @see #getLabel() - * @generated - * @ordered - */ - protected String label = LABEL_EDEFAULT; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; +public abstract class ActionConfigurationImpl extends ConfigurationElementImpl implements ActionConfiguration { /** * * + * * @generated */ protected ActionConfigurationImpl() { @@ -80,139 +41,11 @@ public abstract class ActionConfigurationImpl extends EObjectImpl implements Act /** * * + * * @generated */ @Override protected EClass eStaticClass() { - return ExtendedtypesPackage.Literals.ACTION_CONFIGURATION; - } - - /** - * - * - * @generated - */ - public String getLabel() { - return label; - } - - /** - * - * - * @generated - */ - public void setLabel(String newLabel) { - String oldLabel = label; - label = newLabel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ACTION_CONFIGURATION__LABEL, oldLabel, label)); - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ACTION_CONFIGURATION__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ExtendedtypesPackage.ACTION_CONFIGURATION__LABEL: - return getLabel(); - case ExtendedtypesPackage.ACTION_CONFIGURATION__ID: - return getId(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ExtendedtypesPackage.ACTION_CONFIGURATION__LABEL: - setLabel((String)newValue); - return; - case ExtendedtypesPackage.ACTION_CONFIGURATION__ID: - setId((String)newValue); - return; - } - super.eSet(featureID, newValue); + return ExtendedtypesPackage.eINSTANCE.getActionConfiguration(); } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.ACTION_CONFIGURATION__LABEL: - setLabel(LABEL_EDEFAULT); - return; - case ExtendedtypesPackage.ACTION_CONFIGURATION__ID: - setId(ID_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.ACTION_CONFIGURATION__LABEL: - return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label); - case ExtendedtypesPackage.ACTION_CONFIGURATION__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (label: "); - result.append(label); - result.append(", id: "); - result.append(id); - result.append(')'); - return result.toString(); - } - } //ActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectSemanticTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectSemanticTypeConfigurationImpl.java new file mode 100644 index 00000000000..a6186d939d3 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectSemanticTypeConfigurationImpl.java @@ -0,0 +1,169 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +/** + * + * An implementation of the model object 'Aspect Semantic Type Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.AspectSemanticTypeConfigurationImpl#getActionConfiguration Action Configuration}
    • + *
    + *

    + * + * @generated + */ +public class AspectSemanticTypeConfigurationImpl extends SemanticTypeConfigurationImpl implements AspectSemanticTypeConfiguration { + + /** + * The cached value of the '{@link #getActionConfiguration() Action Configuration}' containment reference list. + * + * + * + * @see #getActionConfiguration() + * @generated + * @ordered + */ + protected EList actionConfiguration; + + /** + * + * + * + * @generated + */ + protected AspectSemanticTypeConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getAspectSemanticTypeConfiguration(); + } + + /** + * + * + * + * @generated + */ + public EList getActionConfiguration() { + if(actionConfiguration == null) { + actionConfiguration = new EObjectContainmentEList(SemanticActionConfiguration.class, this, ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION); + } + return actionConfiguration; + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + return ((InternalEList)getActionConfiguration()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + return getActionConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + getActionConfiguration().clear(); + getActionConfiguration().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + getActionConfiguration().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + return actionConfiguration != null && !actionConfiguration.isEmpty(); + } + return super.eIsSet(featureID); + } +} //AspectSemanticTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectViewTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectViewTypeConfigurationImpl.java new file mode 100644 index 00000000000..7fdfcc0d9f8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/AspectViewTypeConfigurationImpl.java @@ -0,0 +1,169 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration; + +/** + * + * An implementation of the model object 'Aspect View Type Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.AspectViewTypeConfigurationImpl#getActionConfiguration Action Configuration}
    • + *
    + *

    + * + * @generated + */ +public class AspectViewTypeConfigurationImpl extends ViewTypeConfigurationImpl implements AspectViewTypeConfiguration { + + /** + * The cached value of the '{@link #getActionConfiguration() Action Configuration}' containment reference list. + * + * + * + * @see #getActionConfiguration() + * @generated + * @ordered + */ + protected EList actionConfiguration; + + /** + * + * + * + * @generated + */ + protected AspectViewTypeConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getAspectViewTypeConfiguration(); + } + + /** + * + * + * + * @generated + */ + public EList getActionConfiguration() { + if(actionConfiguration == null) { + actionConfiguration = new EObjectContainmentEList(ViewActionConfiguration.class, this, ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION); + } + return actionConfiguration; + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + return ((InternalEList)getActionConfiguration()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + return getActionConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + getActionConfiguration().clear(); + getActionConfiguration().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + getActionConfiguration().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION: + return actionConfiguration != null && !actionConfiguration.isEmpty(); + } + return super.eIsSet(featureID); + } +} //AspectViewTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ConfigurationElementImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ConfigurationElementImpl.java new file mode 100644 index 00000000000..eabcb6cd4a5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ConfigurationElementImpl.java @@ -0,0 +1,389 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.IconEntry; + +/** + * + * An implementation of the model object 'Configuration Element'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ConfigurationElementImpl#getName Name}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ConfigurationElementImpl#getDescription Description}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ConfigurationElementImpl#getIdentifier Identifier}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ConfigurationElementImpl#getIconEntry Icon Entry}
    • + *
    + *

    + * + * @generated + */ +public abstract class ConfigurationElementImpl extends EObjectImpl implements ConfigurationElement { + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getIdentifier() Identifier}' attribute. + * + * + * + * @see #getIdentifier() + * @generated + * @ordered + */ + protected static final String IDENTIFIER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIdentifier() Identifier}' attribute. + * + * + * + * @see #getIdentifier() + * @generated + * @ordered + */ + protected String identifier = IDENTIFIER_EDEFAULT; + + /** + * The cached value of the '{@link #getIconEntry() Icon Entry}' containment reference. + * + * + * + * @see #getIconEntry() + * @generated + * @ordered + */ + protected IconEntry iconEntry; + + /** + * + * + * + * @generated + */ + protected ConfigurationElementImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getConfigurationElement(); + } + + /** + * + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.CONFIGURATION_ELEMENT__NAME, oldName, name)); + } + + /** + * + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.CONFIGURATION_ELEMENT__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * + * @generated + */ + public String getIdentifier() { + return identifier; + } + + /** + * + * + * + * @generated + */ + public void setIdentifier(String newIdentifier) { + String oldIdentifier = identifier; + identifier = newIdentifier; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.CONFIGURATION_ELEMENT__IDENTIFIER, oldIdentifier, identifier)); + } + + /** + * + * + * + * @generated + */ + public IconEntry getIconEntry() { + return iconEntry; + } + + /** + * + * + * + * @generated + */ + public NotificationChain basicSetIconEntry(IconEntry newIconEntry, NotificationChain msgs) { + IconEntry oldIconEntry = iconEntry; + iconEntry = newIconEntry; + if(eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY, oldIconEntry, newIconEntry); + if(msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * + * @generated + */ + public void setIconEntry(IconEntry newIconEntry) { + if(newIconEntry != iconEntry) { + NotificationChain msgs = null; + if(iconEntry != null) + msgs = ((InternalEObject)iconEntry).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY, null, msgs); + if(newIconEntry != null) + msgs = ((InternalEObject)newIconEntry).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY, null, msgs); + msgs = basicSetIconEntry(newIconEntry, msgs); + if(msgs != null) + msgs.dispatch(); + } else if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY, newIconEntry, newIconEntry)); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch(featureID) { + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY: + return basicSetIconEntry(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch(featureID) { + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__NAME: + return getName(); + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__DESCRIPTION: + return getDescription(); + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__IDENTIFIER: + return getIdentifier(); + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY: + return getIconEntry(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch(featureID) { + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__NAME: + setName((String)newValue); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__DESCRIPTION: + setDescription((String)newValue); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__IDENTIFIER: + setIdentifier((String)newValue); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY: + setIconEntry((IconEntry)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__NAME: + setName(NAME_EDEFAULT); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__IDENTIFIER: + setIdentifier(IDENTIFIER_EDEFAULT); + return; + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY: + setIconEntry((IconEntry)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__IDENTIFIER: + return IDENTIFIER_EDEFAULT == null ? identifier != null : !IDENTIFIER_EDEFAULT.equals(identifier); + case ExtendedtypesPackage.CONFIGURATION_ELEMENT__ICON_ENTRY: + return iconEntry != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if(eIsProxy()) + return super.toString(); + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(", identifier: "); //$NON-NLS-1$ + result.append(identifier); + result.append(')'); + return result.toString(); + } +} //ConfigurationElementImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeAdviceConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeAdviceConfigurationImpl.java new file mode 100644 index 00000000000..0a0ef7cdd6b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeAdviceConfigurationImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * + * An implementation of the model object 'Element Type Advice Configuration'. + * + *

    + *

    + * + * @generated + */ +public abstract class ElementTypeAdviceConfigurationImpl extends ConfigurationElementImpl implements ElementTypeAdviceConfiguration { + + /** + * + * + * + * @generated + */ + protected ElementTypeAdviceConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getElementTypeAdviceConfiguration(); + } +} //ElementTypeAdviceConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeConfigurationImpl.java new file mode 100644 index 00000000000..8ac7477ea32 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ElementTypeConfigurationImpl.java @@ -0,0 +1,375 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration; + +/** + * + * An implementation of the model object 'Element Type Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeConfigurationImpl#getHint Hint}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeConfigurationImpl#getKindName Kind Name}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeConfigurationImpl#getSpecializedTypesID Specialized Types ID}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ElementTypeConfigurationImpl#getMatcherConfiguration Matcher Configuration}
    • + *
    + *

    + * + * @generated + */ +public abstract class ElementTypeConfigurationImpl extends ConfigurationElementImpl implements ElementTypeConfiguration { + + /** + * The default value of the '{@link #getHint() Hint}' attribute. + * + * + * + * @see #getHint() + * @generated + * @ordered + */ + protected static final String HINT_EDEFAULT = "ExtendedElements"; //$NON-NLS-1$ + + /** + * The cached value of the '{@link #getHint() Hint}' attribute. + * + * + * + * @see #getHint() + * @generated + * @ordered + */ + protected String hint = HINT_EDEFAULT; + + /** + * The default value of the '{@link #getKindName() Kind Name}' attribute. + * + * + * + * @see #getKindName() + * @generated + * @ordered + */ + protected static final String KIND_NAME_EDEFAULT = "org.eclipse.gmf.runtime.emf.type.core.IHintedType"; //$NON-NLS-1$ + + /** + * The cached value of the '{@link #getKindName() Kind Name}' attribute. + * + * + * + * @see #getKindName() + * @generated + * @ordered + */ + protected String kindName = KIND_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getSpecializedTypesID() Specialized Types ID}' attribute list. + * + * + * + * @see #getSpecializedTypesID() + * @generated + * @ordered + */ + protected EList specializedTypesID; + + /** + * The cached value of the '{@link #getMatcherConfiguration() Matcher Configuration}' containment reference. + * + * + * + * @see #getMatcherConfiguration() + * @generated + * @ordered + */ + protected MatcherConfiguration matcherConfiguration; + + /** + * + * + * + * @generated + */ + protected ElementTypeConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getElementTypeConfiguration(); + } + + /** + * + * + * + * @generated + */ + public String getHint() { + return hint; + } + + /** + * + * + * + * @generated + */ + public void setHint(String newHint) { + String oldHint = hint; + hint = newHint; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__HINT, oldHint, hint)); + } + + /** + * + * + * + * @generated + */ + public String getKindName() { + return kindName; + } + + /** + * + * + * + * @generated + */ + public void setKindName(String newKindName) { + String oldKindName = kindName; + kindName = newKindName; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__KIND_NAME, oldKindName, kindName)); + } + + /** + * + * + * + * @generated + */ + public EList getSpecializedTypesID() { + if(specializedTypesID == null) { + specializedTypesID = new EDataTypeUniqueEList(String.class, this, ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID); + } + return specializedTypesID; + } + + /** + * + * + * + * @generated + */ + public MatcherConfiguration getMatcherConfiguration() { + return matcherConfiguration; + } + + /** + * + * + * + * @generated + */ + public NotificationChain basicSetMatcherConfiguration(MatcherConfiguration newMatcherConfiguration, NotificationChain msgs) { + MatcherConfiguration oldMatcherConfiguration = matcherConfiguration; + matcherConfiguration = newMatcherConfiguration; + if(eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION, oldMatcherConfiguration, newMatcherConfiguration); + if(msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * + * @generated + */ + public void setMatcherConfiguration(MatcherConfiguration newMatcherConfiguration) { + if(newMatcherConfiguration != matcherConfiguration) { + NotificationChain msgs = null; + if(matcherConfiguration != null) + msgs = ((InternalEObject)matcherConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION, null, msgs); + if(newMatcherConfiguration != null) + msgs = ((InternalEObject)newMatcherConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION, null, msgs); + msgs = basicSetMatcherConfiguration(newMatcherConfiguration, msgs); + if(msgs != null) + msgs.dispatch(); + } else if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION, newMatcherConfiguration, newMatcherConfiguration)); + } + + /** + * + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch(featureID) { + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION: + return basicSetMatcherConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch(featureID) { + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__HINT: + return getHint(); + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__KIND_NAME: + return getKindName(); + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: + return getSpecializedTypesID(); + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION: + return getMatcherConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch(featureID) { + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__HINT: + setHint((String)newValue); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__KIND_NAME: + setKindName((String)newValue); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: + getSpecializedTypesID().clear(); + getSpecializedTypesID().addAll((Collection)newValue); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION: + setMatcherConfiguration((MatcherConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__HINT: + setHint(HINT_EDEFAULT); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__KIND_NAME: + setKindName(KIND_NAME_EDEFAULT); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: + getSpecializedTypesID().clear(); + return; + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION: + setMatcherConfiguration((MatcherConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__HINT: + return HINT_EDEFAULT == null ? hint != null : !HINT_EDEFAULT.equals(hint); + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__KIND_NAME: + return KIND_NAME_EDEFAULT == null ? kindName != null : !KIND_NAME_EDEFAULT.equals(kindName); + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: + return specializedTypesID != null && !specializedTypesID.isEmpty(); + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION: + return matcherConfiguration != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if(eIsProxy()) + return super.toString(); + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (hint: "); //$NON-NLS-1$ + result.append(hint); + result.append(", kindName: "); //$NON-NLS-1$ + result.append(kindName); + result.append(", specializedTypesID: "); //$NON-NLS-1$ + result.append(specializedTypesID); + result.append(')'); + return result.toString(); + } +} //ElementTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeConfigurationImpl.java deleted file mode 100644 index 22fce08b622..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeConfigurationImpl.java +++ /dev/null @@ -1,614 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.IconEntry; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * - * An implementation of the model object 'Extended Element Type Configuration'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getName Name}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getId Id}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getIconEntry Icon Entry}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getHint Hint}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getKindName Kind Name}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getSpecializedTypesID Specialized Types ID}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getPreValidation Pre Validation}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getPreAction Pre Action}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getPostAction Post Action}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeConfigurationImpl#getSpecializedDiagramTypeID Specialized Diagram Type ID}
    • - *
    - *

    - * - * @generated - */ -public class ExtendedElementTypeConfigurationImpl extends EObjectImpl implements ExtendedElementTypeConfiguration { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * The cached value of the '{@link #getIconEntry() Icon Entry}' containment reference. - * - * - * @see #getIconEntry() - * @generated - * @ordered - */ - protected IconEntry iconEntry; - - /** - * The default value of the '{@link #getHint() Hint}' attribute. - * - * - * @see #getHint() - * @generated - * @ordered - */ - protected static final String HINT_EDEFAULT = "ExtendedElements"; - - /** - * The cached value of the '{@link #getHint() Hint}' attribute. - * - * - * @see #getHint() - * @generated - * @ordered - */ - protected String hint = HINT_EDEFAULT; - - /** - * The default value of the '{@link #getKindName() Kind Name}' attribute. - * - * - * @see #getKindName() - * @generated - * @ordered - */ - protected static final String KIND_NAME_EDEFAULT = "org.eclipse.gmf.runtime.emf.type.core.IHintedType"; - - /** - * The cached value of the '{@link #getKindName() Kind Name}' attribute. - * - * - * @see #getKindName() - * @generated - * @ordered - */ - protected String kindName = KIND_NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getSpecializedTypesID() Specialized Types ID}' attribute list. - * - * - * @see #getSpecializedTypesID() - * @generated - * @ordered - */ - protected EList specializedTypesID; - - /** - * The cached value of the '{@link #getPreValidation() Pre Validation}' reference list. - * - * - * @see #getPreValidation() - * @generated - * @ordered - */ - protected EList preValidation; - - /** - * The cached value of the '{@link #getPreAction() Pre Action}' containment reference list. - * - * - * @see #getPreAction() - * @generated - * @ordered - */ - protected EList preAction; - - /** - * The cached value of the '{@link #getPostAction() Post Action}' containment reference list. - * - * - * @see #getPostAction() - * @generated - * @ordered - */ - protected EList postAction; - - /** - * The default value of the '{@link #getSpecializedDiagramTypeID() Specialized Diagram Type ID}' attribute. - * - * - * @see #getSpecializedDiagramTypeID() - * @generated - * @ordered - */ - protected static final String SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSpecializedDiagramTypeID() Specialized Diagram Type ID}' attribute. - * - * - * @see #getSpecializedDiagramTypeID() - * @generated - * @ordered - */ - protected String specializedDiagramTypeID = SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT; - - /** - * - * - * @generated - */ - protected ExtendedElementTypeConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ExtendedtypesPackage.Literals.EXTENDED_ELEMENT_TYPE_CONFIGURATION; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - public IconEntry getIconEntry() { - return iconEntry; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetIconEntry(IconEntry newIconEntry, NotificationChain msgs) { - IconEntry oldIconEntry = iconEntry; - iconEntry = newIconEntry; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY, oldIconEntry, newIconEntry); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setIconEntry(IconEntry newIconEntry) { - if (newIconEntry != iconEntry) { - NotificationChain msgs = null; - if (iconEntry != null) - msgs = ((InternalEObject)iconEntry).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY, null, msgs); - if (newIconEntry != null) - msgs = ((InternalEObject)newIconEntry).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY, null, msgs); - msgs = basicSetIconEntry(newIconEntry, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY, newIconEntry, newIconEntry)); - } - - /** - * - * - * @generated - */ - public String getHint() { - return hint; - } - - /** - * - * - * @generated - */ - public void setHint(String newHint) { - String oldHint = hint; - hint = newHint; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT, oldHint, hint)); - } - - /** - * - * - * @generated - */ - public String getKindName() { - return kindName; - } - - /** - * - * - * @generated - */ - public void setKindName(String newKindName) { - String oldKindName = kindName; - kindName = newKindName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME, oldKindName, kindName)); - } - - /** - * - * - * @generated - */ - public EList getSpecializedTypesID() { - if (specializedTypesID == null) { - specializedTypesID = new EDataTypeUniqueEList(String.class, this, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID); - } - return specializedTypesID; - } - - /** - * - * - * @generated - */ - public EList getPreValidation() { - if (preValidation == null) { - preValidation = new EObjectResolvingEList(QueryConfiguration.class, this, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION); - } - return preValidation; - } - - /** - * - * - * @generated - */ - public EList getPreAction() { - if (preAction == null) { - preAction = new EObjectContainmentEList(PreActionConfiguration.class, this, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION); - } - return preAction; - } - - /** - * - * - * @generated - */ - public EList getPostAction() { - if (postAction == null) { - postAction = new EObjectContainmentEList(PostActionConfiguration.class, this, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION); - } - return postAction; - } - - /** - * - * - * @generated - */ - public String getSpecializedDiagramTypeID() { - return specializedDiagramTypeID; - } - - /** - * - * - * @generated - */ - public void setSpecializedDiagramTypeID(String newSpecializedDiagramTypeID) { - String oldSpecializedDiagramTypeID = specializedDiagramTypeID; - specializedDiagramTypeID = newSpecializedDiagramTypeID; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID, oldSpecializedDiagramTypeID, specializedDiagramTypeID)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY: - return basicSetIconEntry(null, msgs); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION: - return ((InternalEList)getPreAction()).basicRemove(otherEnd, msgs); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION: - return ((InternalEList)getPostAction()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME: - return getName(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID: - return getId(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY: - return getIconEntry(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT: - return getHint(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME: - return getKindName(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: - return getSpecializedTypesID(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION: - return getPreValidation(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION: - return getPreAction(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION: - return getPostAction(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: - return getSpecializedDiagramTypeID(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME: - setName((String)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID: - setId((String)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY: - setIconEntry((IconEntry)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT: - setHint((String)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME: - setKindName((String)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: - getSpecializedTypesID().clear(); - getSpecializedTypesID().addAll((Collection)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION: - getPreValidation().clear(); - getPreValidation().addAll((Collection)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION: - getPreAction().clear(); - getPreAction().addAll((Collection)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION: - getPostAction().clear(); - getPostAction().addAll((Collection)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: - setSpecializedDiagramTypeID((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME: - setName(NAME_EDEFAULT); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID: - setId(ID_EDEFAULT); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY: - setIconEntry((IconEntry)null); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT: - setHint(HINT_EDEFAULT); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME: - setKindName(KIND_NAME_EDEFAULT); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: - getSpecializedTypesID().clear(); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION: - getPreValidation().clear(); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION: - getPreAction().clear(); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION: - getPostAction().clear(); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: - setSpecializedDiagramTypeID(SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY: - return iconEntry != null; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT: - return HINT_EDEFAULT == null ? hint != null : !HINT_EDEFAULT.equals(hint); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME: - return KIND_NAME_EDEFAULT == null ? kindName != null : !KIND_NAME_EDEFAULT.equals(kindName); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID: - return specializedTypesID != null && !specializedTypesID.isEmpty(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION: - return preValidation != null && !preValidation.isEmpty(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION: - return preAction != null && !preAction.isEmpty(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION: - return postAction != null && !postAction.isEmpty(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: - return SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT == null ? specializedDiagramTypeID != null : !SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT.equals(specializedDiagramTypeID); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(", id: "); - result.append(id); - result.append(", hint: "); - result.append(hint); - result.append(", kindName: "); - result.append(kindName); - result.append(", specializedTypesID: "); - result.append(specializedTypesID); - result.append(", specializedDiagramTypeID: "); - result.append(specializedDiagramTypeID); - result.append(')'); - return result.toString(); - } - -} //ExtendedElementTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeSetImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeSetImpl.java index 5f547c52d23..bbe94b945f2 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeSetImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedElementTypeSetImpl.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.impl; @@ -10,14 +16,18 @@ import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; + import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; @@ -28,47 +38,52 @@ import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl#getElementType Element Type}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl#getId Id}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl#getElementType Element Type}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ExtendedElementTypeSetImpl#isExtensible Extensible}
    • *
    *

    - * + * * @generated */ -public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedElementTypeSet { +public class ExtendedElementTypeSetImpl extends ConfigurationElementImpl implements ExtendedElementTypeSet { + /** * The cached value of the '{@link #getElementType() Element Type}' containment reference list. * * + * * @see #getElementType() * @generated * @ordered */ - protected EList elementType; + protected EList elementType; /** - * The default value of the '{@link #getId() Id}' attribute. + * The default value of the '{@link #isExtensible() Extensible}' attribute. * * - * @see #getId() + * + * @see #isExtensible() * @generated * @ordered */ - protected static final String ID_EDEFAULT = null; + protected static final boolean EXTENSIBLE_EDEFAULT = false; /** - * The cached value of the '{@link #getId() Id}' attribute. + * The cached value of the '{@link #isExtensible() Extensible}' attribute. * * - * @see #getId() + * + * @see #isExtensible() * @generated * @ordered */ - protected String id = ID_EDEFAULT; + protected boolean extensible = EXTENSIBLE_EDEFAULT; /** * * + * * @generated */ protected ExtendedElementTypeSetImpl() { @@ -78,21 +93,23 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ @Override protected EClass eStaticClass() { - return ExtendedtypesPackage.Literals.EXTENDED_ELEMENT_TYPE_SET; + return ExtendedtypesPackage.eINSTANCE.getExtendedElementTypeSet(); } /** * * + * * @generated */ - public EList getElementType() { - if (elementType == null) { - elementType = new EObjectContainmentEList(ExtendedElementTypeConfiguration.class, this, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE); + public EList getElementType() { + if(elementType == null) { + elementType = new EObjectContainmentEList(ElementTypeConfiguration.class, this, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE); } return elementType; } @@ -100,34 +117,37 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ - public String getId() { - return id; + public boolean isExtensible() { + return extensible; } /** * * + * * @generated */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ID, oldId, id)); + public void setExtensible(boolean newExtensible) { + boolean oldExtensible = extensible; + extensible = newExtensible; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE, oldExtensible, extensible)); } /** * * + * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: - return ((InternalEList)getElementType()).basicRemove(otherEnd, msgs); + switch(featureID) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: + return ((InternalEList)getElementType()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -135,15 +155,16 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: - return getElementType(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ID: - return getId(); + switch(featureID) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: + return getElementType(); + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE: + return isExtensible(); } return super.eGet(featureID, resolve, coreType); } @@ -151,19 +172,20 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: - getElementType().clear(); - getElementType().addAll((Collection)newValue); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ID: - setId((String)newValue); - return; + switch(featureID) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: + getElementType().clear(); + getElementType().addAll((Collection)newValue); + return; + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE: + setExtensible((Boolean)newValue); + return; } super.eSet(featureID, newValue); } @@ -171,17 +193,18 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: - getElementType().clear(); - return; - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ID: - setId(ID_EDEFAULT); - return; + switch(featureID) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: + getElementType().clear(); + return; + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE: + setExtensible(EXTENSIBLE_EDEFAULT); + return; } super.eUnset(featureID); } @@ -189,15 +212,16 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: - return elementType != null && !elementType.isEmpty(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + switch(featureID) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE: + return elementType != null && !elementType.isEmpty(); + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE: + return extensible != EXTENSIBLE_EDEFAULT; } return super.eIsSet(featureID); } @@ -205,17 +229,17 @@ public class ExtendedElementTypeSetImpl extends EObjectImpl implements ExtendedE /** * * + * * @generated */ @Override public String toString() { - if (eIsProxy()) return super.toString(); - + if(eIsProxy()) + return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (id: "); - result.append(id); + result.append(" (extensible: "); //$NON-NLS-1$ + result.append(extensible); result.append(')'); return result.toString(); } - } //ExtendedElementTypeSetImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesFactoryImpl.java index afa82b60f45..845502690ba 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesFactoryImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesFactoryImpl.java @@ -1,43 +1,50 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.impl.EFactoryImpl; + import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesFactory; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.IconEntry; + +import org.eclipse.papyrus.infra.extendedtypes.*; /** * * An implementation of the model Factory. * + * * @generated */ public class ExtendedtypesFactoryImpl extends EFactoryImpl implements ExtendedtypesFactory { + /** * Creates the default factory implementation. * * + * * @generated */ public static ExtendedtypesFactory init() { try { - ExtendedtypesFactory theExtendedtypesFactory = (ExtendedtypesFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/diagram/types/extendedtypes/0.7"); - if (theExtendedtypesFactory != null) { + ExtendedtypesFactory theExtendedtypesFactory = (ExtendedtypesFactory)EPackage.Registry.INSTANCE.getEFactory(ExtendedtypesPackage.eNS_URI); + if(theExtendedtypesFactory != null) { return theExtendedtypesFactory; } - } - catch (Exception exception) { + } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ExtendedtypesFactoryImpl(); @@ -47,6 +54,7 @@ public class ExtendedtypesFactoryImpl extends EFactoryImpl implements Extendedty * Creates an instance of the factory. * * + * * @generated */ public ExtendedtypesFactoryImpl() { @@ -56,22 +64,29 @@ public class ExtendedtypesFactoryImpl extends EFactoryImpl implements Extendedty /** * * + * * @generated */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET: return createExtendedElementTypeSet(); - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION: return createExtendedElementTypeConfiguration(); - case ExtendedtypesPackage.ICON_ENTRY: return createIconEntry(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + switch(eClass.getClassifierID()) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET: + return createExtendedElementTypeSet(); + case ExtendedtypesPackage.ICON_ENTRY: + return createIconEntry(); + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION: + return createAspectSemanticTypeConfiguration(); + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION: + return createAspectViewTypeConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } } /** * * + * * @generated */ public ExtendedElementTypeSet createExtendedElementTypeSet() { @@ -82,26 +97,40 @@ public class ExtendedtypesFactoryImpl extends EFactoryImpl implements Extendedty /** * * + * * @generated */ - public ExtendedElementTypeConfiguration createExtendedElementTypeConfiguration() { - ExtendedElementTypeConfigurationImpl extendedElementTypeConfiguration = new ExtendedElementTypeConfigurationImpl(); - return extendedElementTypeConfiguration; + public IconEntry createIconEntry() { + IconEntryImpl iconEntry = new IconEntryImpl(); + return iconEntry; } /** * * + * * @generated */ - public IconEntry createIconEntry() { - IconEntryImpl iconEntry = new IconEntryImpl(); - return iconEntry; + public AspectSemanticTypeConfiguration createAspectSemanticTypeConfiguration() { + AspectSemanticTypeConfigurationImpl aspectSemanticTypeConfiguration = new AspectSemanticTypeConfigurationImpl(); + return aspectSemanticTypeConfiguration; } /** * * + * + * @generated + */ + public AspectViewTypeConfiguration createAspectViewTypeConfiguration() { + AspectViewTypeConfigurationImpl aspectViewTypeConfiguration = new AspectViewTypeConfigurationImpl(); + return aspectViewTypeConfiguration; + } + + /** + * + * + * * @generated */ public ExtendedtypesPackage getExtendedtypesPackage() { @@ -111,6 +140,7 @@ public class ExtendedtypesFactoryImpl extends EFactoryImpl implements Extendedty /** * * + * * @deprecated * @generated */ @@ -118,5 +148,4 @@ public class ExtendedtypesFactoryImpl extends EFactoryImpl implements Extendedty public static ExtendedtypesPackage getPackage() { return ExtendedtypesPackage.eINSTANCE; } - } //ExtendedtypesFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesPackageImpl.java index fdbc63cc5f1..547e6c246be 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesPackageImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ExtendedtypesPackageImpl.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.impl; @@ -10,27 +16,39 @@ import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + import org.eclipse.emf.ecore.impl.EPackageImpl; + import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesFactory; import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; import org.eclipse.papyrus.infra.extendedtypes.IconEntry; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration; /** * * An implementation of the model Package. * + * * @generated */ public class ExtendedtypesPackageImpl extends EPackageImpl implements ExtendedtypesPackage { + /** * * + * * @generated */ private EClass extendedElementTypeSetEClass = null; @@ -38,13 +56,15 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ - private EClass extendedElementTypeConfigurationEClass = null; + private EClass elementTypeConfigurationEClass = null; /** * * + * * @generated */ private EClass iconEntryEClass = null; @@ -52,6 +72,23 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * + * @generated + */ + private EClass configurationElementEClass = null; + + /** + * + * + * + * @generated + */ + private EClass matcherConfigurationEClass = null; + + /** + * + * + * * @generated */ private EClass actionConfigurationEClass = null; @@ -59,27 +96,67 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ - private EClass preActionConfigurationEClass = null; + private EClass viewActionConfigurationEClass = null; /** * * + * * @generated */ - private EClass postActionConfigurationEClass = null; + private EClass semanticActionConfigurationEClass = null; /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

    Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. * * + * + * @generated + */ + private EClass semanticTypeConfigurationEClass = null; + + /** + * + * + * + * @generated + */ + private EClass viewTypeConfigurationEClass = null; + + /** + * + * + * + * @generated + */ + private EClass elementTypeAdviceConfigurationEClass = null; + + /** + * + * + * + * @generated + */ + private EClass aspectSemanticTypeConfigurationEClass = null; + + /** + * + * + * + * @generated + */ + private EClass aspectViewTypeConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the + * package + * package URI value. + *

    + * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the + * package, or returns the registered package, if one already exists. + * * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage#eNS_URI * @see #init() @@ -92,6 +169,7 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ private static boolean isInited = false; @@ -99,36 +177,29 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. * - *

    This method is used to initialize {@link ExtendedtypesPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * + *

    + * This method is used to initialize {@link ExtendedtypesPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. + * Instead, they should simply access that field to obtain the package. + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static ExtendedtypesPackage init() { - if (isInited) return (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); - + if(isInited) + return (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); // Obtain or create and register package ExtendedtypesPackageImpl theExtendedtypesPackage = (ExtendedtypesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ExtendedtypesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ExtendedtypesPackageImpl()); - isInited = true; - // Initialize simple dependencies - ConfigurationPackage.eINSTANCE.eClass(); - + EcorePackage.eINSTANCE.eClass(); // Create package meta-data objects theExtendedtypesPackage.createPackageContents(); - // Initialize created meta-data theExtendedtypesPackage.initializePackageContents(); - // Mark meta-data to indicate it can't be changed theExtendedtypesPackage.freeze(); - - // Update the registry and return the package EPackage.Registry.INSTANCE.put(ExtendedtypesPackage.eNS_URI, theExtendedtypesPackage); return theExtendedtypesPackage; @@ -137,6 +208,7 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ public EClass getExtendedElementTypeSet() { @@ -146,6 +218,7 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ public EReference getExtendedElementTypeSet_ElementType() { @@ -155,141 +228,157 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ - public EAttribute getExtendedElementTypeSet_Id() { + public EAttribute getExtendedElementTypeSet_Extensible() { return (EAttribute)extendedElementTypeSetEClass.getEStructuralFeatures().get(1); } /** * * + * * @generated */ - public EClass getExtendedElementTypeConfiguration() { - return extendedElementTypeConfigurationEClass; + public EClass getElementTypeConfiguration() { + return elementTypeConfigurationEClass; } /** * * + * * @generated */ - public EAttribute getExtendedElementTypeConfiguration_Name() { - return (EAttribute)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(0); + public EAttribute getElementTypeConfiguration_Hint() { + return (EAttribute)elementTypeConfigurationEClass.getEStructuralFeatures().get(0); } /** * * + * * @generated */ - public EAttribute getExtendedElementTypeConfiguration_Id() { - return (EAttribute)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(1); + public EAttribute getElementTypeConfiguration_KindName() { + return (EAttribute)elementTypeConfigurationEClass.getEStructuralFeatures().get(1); } /** * * + * * @generated */ - public EReference getExtendedElementTypeConfiguration_IconEntry() { - return (EReference)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(2); + public EAttribute getElementTypeConfiguration_SpecializedTypesID() { + return (EAttribute)elementTypeConfigurationEClass.getEStructuralFeatures().get(2); } /** * * + * * @generated */ - public EAttribute getExtendedElementTypeConfiguration_Hint() { - return (EAttribute)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(3); + public EReference getElementTypeConfiguration_MatcherConfiguration() { + return (EReference)elementTypeConfigurationEClass.getEStructuralFeatures().get(3); } /** * * + * * @generated */ - public EAttribute getExtendedElementTypeConfiguration_KindName() { - return (EAttribute)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(4); + public EClass getIconEntry() { + return iconEntryEClass; } /** * * + * * @generated */ - public EAttribute getExtendedElementTypeConfiguration_SpecializedTypesID() { - return (EAttribute)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(5); + public EAttribute getIconEntry_IconPath() { + return (EAttribute)iconEntryEClass.getEStructuralFeatures().get(0); } /** * * + * * @generated */ - public EReference getExtendedElementTypeConfiguration_PreValidation() { - return (EReference)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(6); + public EAttribute getIconEntry_BundleId() { + return (EAttribute)iconEntryEClass.getEStructuralFeatures().get(1); } /** * * + * * @generated */ - public EReference getExtendedElementTypeConfiguration_PreAction() { - return (EReference)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(7); + public EClass getConfigurationElement() { + return configurationElementEClass; } /** * * + * * @generated */ - public EReference getExtendedElementTypeConfiguration_PostAction() { - return (EReference)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(8); + public EAttribute getConfigurationElement_Name() { + return (EAttribute)configurationElementEClass.getEStructuralFeatures().get(0); } /** * * + * * @generated */ - public EAttribute getExtendedElementTypeConfiguration_SpecializedDiagramTypeID() { - return (EAttribute)extendedElementTypeConfigurationEClass.getEStructuralFeatures().get(9); + public EAttribute getConfigurationElement_Description() { + return (EAttribute)configurationElementEClass.getEStructuralFeatures().get(1); } /** * * + * * @generated */ - public EClass getIconEntry() { - return iconEntryEClass; + public EAttribute getConfigurationElement_Identifier() { + return (EAttribute)configurationElementEClass.getEStructuralFeatures().get(2); } /** * * + * * @generated */ - public EAttribute getIconEntry_IconPath() { - return (EAttribute)iconEntryEClass.getEStructuralFeatures().get(0); + public EReference getConfigurationElement_IconEntry() { + return (EReference)configurationElementEClass.getEStructuralFeatures().get(3); } /** * * + * * @generated */ - public EAttribute getIconEntry_BundleId() { - return (EAttribute)iconEntryEClass.getEStructuralFeatures().get(1); + public EClass getMatcherConfiguration() { + return matcherConfigurationEClass; } /** * * + * * @generated */ public EClass getActionConfiguration() { @@ -299,42 +388,107 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ - public EAttribute getActionConfiguration_Label() { - return (EAttribute)actionConfigurationEClass.getEStructuralFeatures().get(0); + public EClass getViewActionConfiguration() { + return viewActionConfigurationEClass; } /** * * + * * @generated */ - public EAttribute getActionConfiguration_Id() { - return (EAttribute)actionConfigurationEClass.getEStructuralFeatures().get(1); + public EClass getSemanticActionConfiguration() { + return semanticActionConfigurationEClass; } /** * * + * * @generated */ - public EClass getPreActionConfiguration() { - return preActionConfigurationEClass; + public EClass getSemanticTypeConfiguration() { + return semanticTypeConfigurationEClass; } /** * * + * * @generated */ - public EClass getPostActionConfiguration() { - return postActionConfigurationEClass; + public EClass getViewTypeConfiguration() { + return viewTypeConfigurationEClass; } /** * * + * + * @generated + */ + public EAttribute getViewTypeConfiguration_SpecializedDiagramTypeID() { + return (EAttribute)viewTypeConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + public EClass getElementTypeAdviceConfiguration() { + return elementTypeAdviceConfigurationEClass; + } + + /** + * + * + * + * @generated + */ + public EClass getAspectSemanticTypeConfiguration() { + return aspectSemanticTypeConfigurationEClass; + } + + /** + * + * + * + * @generated + */ + public EReference getAspectSemanticTypeConfiguration_ActionConfiguration() { + return (EReference)aspectSemanticTypeConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * + * @generated + */ + public EClass getAspectViewTypeConfiguration() { + return aspectViewTypeConfigurationEClass; + } + + /** + * + * + * + * @generated + */ + public EReference getAspectViewTypeConfiguration_ActionConfiguration() { + return (EReference)aspectViewTypeConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * * @generated */ public ExtendedtypesFactory getExtendedtypesFactory() { @@ -344,116 +498,123 @@ public class ExtendedtypesPackageImpl extends EPackageImpl implements Extendedty /** * * + * * @generated */ private boolean isCreated = false; /** - * Creates the meta-model objects for the package. This method is + * Creates the meta-model objects for the package. This method is * guarded to have no affect on any invocation but its first. * * + * * @generated */ public void createPackageContents() { - if (isCreated) return; + if(isCreated) + return; isCreated = true; - // Create classes and their features extendedElementTypeSetEClass = createEClass(EXTENDED_ELEMENT_TYPE_SET); createEReference(extendedElementTypeSetEClass, EXTENDED_ELEMENT_TYPE_SET__ELEMENT_TYPE); - createEAttribute(extendedElementTypeSetEClass, EXTENDED_ELEMENT_TYPE_SET__ID); - - extendedElementTypeConfigurationEClass = createEClass(EXTENDED_ELEMENT_TYPE_CONFIGURATION); - createEAttribute(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__NAME); - createEAttribute(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__ID); - createEReference(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__ICON_ENTRY); - createEAttribute(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__HINT); - createEAttribute(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__KIND_NAME); - createEAttribute(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID); - createEReference(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_VALIDATION); - createEReference(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__PRE_ACTION); - createEReference(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__POST_ACTION); - createEAttribute(extendedElementTypeConfigurationEClass, EXTENDED_ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID); - + createEAttribute(extendedElementTypeSetEClass, EXTENDED_ELEMENT_TYPE_SET__EXTENSIBLE); + elementTypeConfigurationEClass = createEClass(ELEMENT_TYPE_CONFIGURATION); + createEAttribute(elementTypeConfigurationEClass, ELEMENT_TYPE_CONFIGURATION__HINT); + createEAttribute(elementTypeConfigurationEClass, ELEMENT_TYPE_CONFIGURATION__KIND_NAME); + createEAttribute(elementTypeConfigurationEClass, ELEMENT_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID); + createEReference(elementTypeConfigurationEClass, ELEMENT_TYPE_CONFIGURATION__MATCHER_CONFIGURATION); iconEntryEClass = createEClass(ICON_ENTRY); createEAttribute(iconEntryEClass, ICON_ENTRY__ICON_PATH); createEAttribute(iconEntryEClass, ICON_ENTRY__BUNDLE_ID); - + configurationElementEClass = createEClass(CONFIGURATION_ELEMENT); + createEAttribute(configurationElementEClass, CONFIGURATION_ELEMENT__NAME); + createEAttribute(configurationElementEClass, CONFIGURATION_ELEMENT__DESCRIPTION); + createEAttribute(configurationElementEClass, CONFIGURATION_ELEMENT__IDENTIFIER); + createEReference(configurationElementEClass, CONFIGURATION_ELEMENT__ICON_ENTRY); + matcherConfigurationEClass = createEClass(MATCHER_CONFIGURATION); actionConfigurationEClass = createEClass(ACTION_CONFIGURATION); - createEAttribute(actionConfigurationEClass, ACTION_CONFIGURATION__LABEL); - createEAttribute(actionConfigurationEClass, ACTION_CONFIGURATION__ID); - - preActionConfigurationEClass = createEClass(PRE_ACTION_CONFIGURATION); - - postActionConfigurationEClass = createEClass(POST_ACTION_CONFIGURATION); + viewActionConfigurationEClass = createEClass(VIEW_ACTION_CONFIGURATION); + semanticActionConfigurationEClass = createEClass(SEMANTIC_ACTION_CONFIGURATION); + semanticTypeConfigurationEClass = createEClass(SEMANTIC_TYPE_CONFIGURATION); + viewTypeConfigurationEClass = createEClass(VIEW_TYPE_CONFIGURATION); + createEAttribute(viewTypeConfigurationEClass, VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID); + elementTypeAdviceConfigurationEClass = createEClass(ELEMENT_TYPE_ADVICE_CONFIGURATION); + aspectSemanticTypeConfigurationEClass = createEClass(ASPECT_SEMANTIC_TYPE_CONFIGURATION); + createEReference(aspectSemanticTypeConfigurationEClass, ASPECT_SEMANTIC_TYPE_CONFIGURATION__ACTION_CONFIGURATION); + aspectViewTypeConfigurationEClass = createEClass(ASPECT_VIEW_TYPE_CONFIGURATION); + createEReference(aspectViewTypeConfigurationEClass, ASPECT_VIEW_TYPE_CONFIGURATION__ACTION_CONFIGURATION); } /** * * + * * @generated */ private boolean isInitialized = false; /** - * Complete the initialization of the package and its meta-model. This + * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * * + * * @generated */ public void initializePackageContents() { - if (isInitialized) return; + if(isInitialized) + return; isInitialized = true; - // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); - // Obtain other dependent packages - ConfigurationPackage theConfigurationPackage = (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI); - + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); // Create type parameters - // Set bounds for type parameters - // Add supertypes to classes - preActionConfigurationEClass.getESuperTypes().add(this.getActionConfiguration()); - postActionConfigurationEClass.getESuperTypes().add(this.getActionConfiguration()); - + extendedElementTypeSetEClass.getESuperTypes().add(this.getConfigurationElement()); + elementTypeConfigurationEClass.getESuperTypes().add(this.getConfigurationElement()); + actionConfigurationEClass.getESuperTypes().add(this.getConfigurationElement()); + viewActionConfigurationEClass.getESuperTypes().add(this.getActionConfiguration()); + semanticActionConfigurationEClass.getESuperTypes().add(this.getActionConfiguration()); + semanticTypeConfigurationEClass.getESuperTypes().add(this.getElementTypeConfiguration()); + viewTypeConfigurationEClass.getESuperTypes().add(this.getElementTypeConfiguration()); + elementTypeAdviceConfigurationEClass.getESuperTypes().add(this.getConfigurationElement()); + aspectSemanticTypeConfigurationEClass.getESuperTypes().add(this.getSemanticTypeConfiguration()); + aspectViewTypeConfigurationEClass.getESuperTypes().add(this.getViewTypeConfiguration()); // Initialize classes and features; add operations and parameters - initEClass(extendedElementTypeSetEClass, ExtendedElementTypeSet.class, "ExtendedElementTypeSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getExtendedElementTypeSet_ElementType(), this.getExtendedElementTypeConfiguration(), null, "elementType", null, 1, -1, ExtendedElementTypeSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getExtendedElementTypeSet_Id(), ecorePackage.getEString(), "id", null, 1, 1, ExtendedElementTypeSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(extendedElementTypeConfigurationEClass, ExtendedElementTypeConfiguration.class, "ExtendedElementTypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getExtendedElementTypeConfiguration_Name(), ecorePackage.getEString(), "name", null, 1, 1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getExtendedElementTypeConfiguration_Id(), ecorePackage.getEString(), "id", null, 1, 1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExtendedElementTypeConfiguration_IconEntry(), this.getIconEntry(), null, "iconEntry", null, 0, 1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getExtendedElementTypeConfiguration_Hint(), ecorePackage.getEString(), "hint", "ExtendedElements", 0, 1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getExtendedElementTypeConfiguration_KindName(), ecorePackage.getEString(), "kindName", "org.eclipse.gmf.runtime.emf.type.core.IHintedType", 0, 1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getExtendedElementTypeConfiguration_SpecializedTypesID(), ecorePackage.getEString(), "specializedTypesID", null, 1, -1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExtendedElementTypeConfiguration_PreValidation(), theConfigurationPackage.getQueryConfiguration(), null, "preValidation", null, 0, -1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExtendedElementTypeConfiguration_PreAction(), this.getPreActionConfiguration(), null, "preAction", null, 0, -1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExtendedElementTypeConfiguration_PostAction(), this.getPostActionConfiguration(), null, "postAction", null, 0, -1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getExtendedElementTypeConfiguration_SpecializedDiagramTypeID(), ecorePackage.getEString(), "specializedDiagramTypeID", null, 0, 1, ExtendedElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(iconEntryEClass, IconEntry.class, "IconEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIconEntry_IconPath(), ecorePackage.getEString(), "iconPath", null, 0, 1, IconEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIconEntry_BundleId(), ecorePackage.getEString(), "bundleId", null, 0, 1, IconEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(actionConfigurationEClass, ActionConfiguration.class, "ActionConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getActionConfiguration_Label(), ecorePackage.getEString(), "label", null, 0, 1, ActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getActionConfiguration_Id(), ecorePackage.getEString(), "id", null, 1, 1, ActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(preActionConfigurationEClass, PreActionConfiguration.class, "PreActionConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(postActionConfigurationEClass, PostActionConfiguration.class, "PostActionConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - + initEClass(extendedElementTypeSetEClass, ExtendedElementTypeSet.class, "ExtendedElementTypeSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getExtendedElementTypeSet_ElementType(), this.getElementTypeConfiguration(), null, "elementType", null, 1, -1, ExtendedElementTypeSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getExtendedElementTypeSet_Extensible(), theEcorePackage.getEBoolean(), "extensible", null, 0, 1, ExtendedElementTypeSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(elementTypeConfigurationEClass, ElementTypeConfiguration.class, "ElementTypeConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getElementTypeConfiguration_Hint(), ecorePackage.getEString(), "hint", "ExtendedElements", 0, 1, ElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getElementTypeConfiguration_KindName(), ecorePackage.getEString(), "kindName", "org.eclipse.gmf.runtime.emf.type.core.IHintedType", 0, 1, ElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getElementTypeConfiguration_SpecializedTypesID(), ecorePackage.getEString(), "specializedTypesID", null, 1, -1, ElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getElementTypeConfiguration_MatcherConfiguration(), this.getMatcherConfiguration(), null, "matcherConfiguration", null, 0, 1, ElementTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(iconEntryEClass, IconEntry.class, "IconEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIconEntry_IconPath(), ecorePackage.getEString(), "iconPath", null, 0, 1, IconEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getIconEntry_BundleId(), ecorePackage.getEString(), "bundleId", null, 0, 1, IconEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(configurationElementEClass, ConfigurationElement.class, "ConfigurationElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getConfigurationElement_Name(), theEcorePackage.getEString(), "name", null, 1, 1, ConfigurationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getConfigurationElement_Description(), theEcorePackage.getEString(), "description", null, 0, 1, ConfigurationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getConfigurationElement_Identifier(), theEcorePackage.getEString(), "identifier", null, 1, 1, ConfigurationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getConfigurationElement_IconEntry(), this.getIconEntry(), null, "iconEntry", null, 0, 1, ConfigurationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(matcherConfigurationEClass, MatcherConfiguration.class, "MatcherConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(actionConfigurationEClass, ActionConfiguration.class, "ActionConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(viewActionConfigurationEClass, ViewActionConfiguration.class, "ViewActionConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(semanticActionConfigurationEClass, SemanticActionConfiguration.class, "SemanticActionConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(semanticTypeConfigurationEClass, SemanticTypeConfiguration.class, "SemanticTypeConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(viewTypeConfigurationEClass, ViewTypeConfiguration.class, "ViewTypeConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getViewTypeConfiguration_SpecializedDiagramTypeID(), ecorePackage.getEString(), "specializedDiagramTypeID", null, 0, 1, ViewTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(elementTypeAdviceConfigurationEClass, ElementTypeAdviceConfiguration.class, "ElementTypeAdviceConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEClass(aspectSemanticTypeConfigurationEClass, AspectSemanticTypeConfiguration.class, "AspectSemanticTypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getAspectSemanticTypeConfiguration_ActionConfiguration(), this.getSemanticActionConfiguration(), null, "actionConfiguration", null, 0, -1, AspectSemanticTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(aspectViewTypeConfigurationEClass, AspectViewTypeConfiguration.class, "AspectViewTypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getAspectViewTypeConfiguration_ActionConfiguration(), this.getViewActionConfiguration(), null, "actionConfiguration", null, 0, -1, AspectViewTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ // Create resource createResource(eNS_URI); } - } //ExtendedtypesPackageImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/IconEntryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/IconEntryImpl.java index c060449d21e..2f51c7a08ba 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/IconEntryImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/IconEntryImpl.java @@ -1,15 +1,24 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.impl; import org.eclipse.emf.common.notify.Notification; + import org.eclipse.emf.ecore.EClass; + import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; + import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; import org.eclipse.papyrus.infra.extendedtypes.IconEntry; @@ -20,18 +29,20 @@ import org.eclipse.papyrus.infra.extendedtypes.IconEntry; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl#getIconPath Icon Path}
    • - *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl#getBundleId Bundle Id}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl#getIconPath Icon Path}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl#getBundleId Bundle Id}
    • *
    *

    - * + * * @generated */ public class IconEntryImpl extends EObjectImpl implements IconEntry { + /** * The default value of the '{@link #getIconPath() Icon Path}' attribute. * * + * * @see #getIconPath() * @generated * @ordered @@ -42,6 +53,7 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { * The cached value of the '{@link #getIconPath() Icon Path}' attribute. * * + * * @see #getIconPath() * @generated * @ordered @@ -52,6 +64,7 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { * The default value of the '{@link #getBundleId() Bundle Id}' attribute. * * + * * @see #getBundleId() * @generated * @ordered @@ -62,6 +75,7 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { * The cached value of the '{@link #getBundleId() Bundle Id}' attribute. * * + * * @see #getBundleId() * @generated * @ordered @@ -71,6 +85,7 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ protected IconEntryImpl() { @@ -80,16 +95,18 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ @Override protected EClass eStaticClass() { - return ExtendedtypesPackage.Literals.ICON_ENTRY; + return ExtendedtypesPackage.eINSTANCE.getIconEntry(); } /** * * + * * @generated */ public String getIconPath() { @@ -99,18 +116,20 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ public void setIconPath(String newIconPath) { String oldIconPath = iconPath; iconPath = newIconPath; - if (eNotificationRequired()) + if(eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ICON_ENTRY__ICON_PATH, oldIconPath, iconPath)); } /** * * + * * @generated */ public String getBundleId() { @@ -120,27 +139,29 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ public void setBundleId(String newBundleId) { String oldBundleId = bundleId; bundleId = newBundleId; - if (eNotificationRequired()) + if(eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID, oldBundleId, bundleId)); } /** * * + * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: - return getIconPath(); - case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: - return getBundleId(); + switch(featureID) { + case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: + return getIconPath(); + case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: + return getBundleId(); } return super.eGet(featureID, resolve, coreType); } @@ -148,17 +169,18 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: - setIconPath((String)newValue); - return; - case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: - setBundleId((String)newValue); - return; + switch(featureID) { + case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: + setIconPath((String)newValue); + return; + case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: + setBundleId((String)newValue); + return; } super.eSet(featureID, newValue); } @@ -166,17 +188,18 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: - setIconPath(ICON_PATH_EDEFAULT); - return; - case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: - setBundleId(BUNDLE_ID_EDEFAULT); - return; + switch(featureID) { + case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: + setIconPath(ICON_PATH_EDEFAULT); + return; + case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: + setBundleId(BUNDLE_ID_EDEFAULT); + return; } super.eUnset(featureID); } @@ -184,15 +207,16 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: - return ICON_PATH_EDEFAULT == null ? iconPath != null : !ICON_PATH_EDEFAULT.equals(iconPath); - case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: - return BUNDLE_ID_EDEFAULT == null ? bundleId != null : !BUNDLE_ID_EDEFAULT.equals(bundleId); + switch(featureID) { + case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: + return ICON_PATH_EDEFAULT == null ? iconPath != null : !ICON_PATH_EDEFAULT.equals(iconPath); + case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: + return BUNDLE_ID_EDEFAULT == null ? bundleId != null : !BUNDLE_ID_EDEFAULT.equals(bundleId); } return super.eIsSet(featureID); } @@ -200,19 +224,19 @@ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * * + * * @generated */ @Override public String toString() { - if (eIsProxy()) return super.toString(); - + if(eIsProxy()) + return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (iconPath: "); + result.append(" (iconPath: "); //$NON-NLS-1$ result.append(iconPath); - result.append(", bundleId: "); + result.append(", bundleId: "); //$NON-NLS-1$ result.append(bundleId); result.append(')'); return result.toString(); } - } //IconEntryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/MatcherConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/MatcherConfigurationImpl.java new file mode 100644 index 00000000000..f34583833ed --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/MatcherConfigurationImpl.java @@ -0,0 +1,53 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration; + +/** + * + * An implementation of the model object 'Matcher Configuration'. + * + *

    + *

    + * + * @generated + */ +public abstract class MatcherConfigurationImpl extends EObjectImpl implements MatcherConfiguration { + + /** + * + * + * + * @generated + */ + protected MatcherConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getMatcherConfiguration(); + } +} //MatcherConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PostActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PostActionConfigurationImpl.java deleted file mode 100644 index 2a2e4bf2547..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PostActionConfigurationImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; - -/** - * - * An implementation of the model object 'Post Action Configuration'. - * - *

    - *

    - * - * @generated - */ -public abstract class PostActionConfigurationImpl extends ActionConfigurationImpl implements PostActionConfiguration { - /** - * - * - * @generated - */ - protected PostActionConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ExtendedtypesPackage.Literals.POST_ACTION_CONFIGURATION; - } - -} //PostActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PreActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PreActionConfigurationImpl.java deleted file mode 100644 index f75fe87c05a..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/PreActionConfigurationImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.extendedtypes.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration; - -/** - * - * An implementation of the model object 'Pre Action Configuration'. - * - *

    - *

    - * - * @generated - */ -public abstract class PreActionConfigurationImpl extends ActionConfigurationImpl implements PreActionConfiguration { - /** - * - * - * @generated - */ - protected PreActionConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ExtendedtypesPackage.Literals.PRE_ACTION_CONFIGURATION; - } - -} //PreActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticActionConfigurationImpl.java new file mode 100644 index 00000000000..09c1a9abc79 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticActionConfigurationImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +/** + * + * An implementation of the model object 'Semantic Action Configuration'. + * + *

    + *

    + * + * @generated + */ +public abstract class SemanticActionConfigurationImpl extends ActionConfigurationImpl implements SemanticActionConfiguration { + + /** + * + * + * + * @generated + */ + protected SemanticActionConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getSemanticActionConfiguration(); + } +} //SemanticActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticTypeConfigurationImpl.java new file mode 100644 index 00000000000..b2c45a9eedb --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/SemanticTypeConfigurationImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration; + +/** + * + * An implementation of the model object 'Semantic Type Configuration'. + * + *

    + *

    + * + * @generated + */ +public abstract class SemanticTypeConfigurationImpl extends ElementTypeConfigurationImpl implements SemanticTypeConfiguration { + + /** + * + * + * + * @generated + */ + protected SemanticTypeConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getSemanticTypeConfiguration(); + } +} //SemanticTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewActionConfigurationImpl.java new file mode 100644 index 00000000000..b710e17129b --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewActionConfigurationImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration; + +/** + * + * An implementation of the model object 'View Action Configuration'. + * + *

    + *

    + * + * @generated + */ +public abstract class ViewActionConfigurationImpl extends ActionConfigurationImpl implements ViewActionConfiguration { + + /** + * + * + * + * @generated + */ + protected ViewActionConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getViewActionConfiguration(); + } +} //ViewActionConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewTypeConfigurationImpl.java new file mode 100644 index 00000000000..6c1e3648b64 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/impl/ViewTypeConfigurationImpl.java @@ -0,0 +1,184 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration; + +/** + * + * An implementation of the model object 'View Type Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.impl.ViewTypeConfigurationImpl#getSpecializedDiagramTypeID Specialized Diagram Type ID} + *
    • + *
    + *

    + * + * @generated + */ +public abstract class ViewTypeConfigurationImpl extends ElementTypeConfigurationImpl implements ViewTypeConfiguration { + + /** + * The default value of the '{@link #getSpecializedDiagramTypeID() Specialized Diagram Type ID}' attribute. + * + * + * + * @see #getSpecializedDiagramTypeID() + * @generated + * @ordered + */ + protected static final String SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSpecializedDiagramTypeID() Specialized Diagram Type ID}' attribute. + * + * + * + * @see #getSpecializedDiagramTypeID() + * @generated + * @ordered + */ + protected String specializedDiagramTypeID = SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT; + + /** + * + * + * + * @generated + */ + protected ViewTypeConfigurationImpl() { + super(); + } + + /** + * + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtendedtypesPackage.eINSTANCE.getViewTypeConfiguration(); + } + + /** + * + * + * + * @generated + */ + public String getSpecializedDiagramTypeID() { + return specializedDiagramTypeID; + } + + /** + * + * + * + * @generated + */ + public void setSpecializedDiagramTypeID(String newSpecializedDiagramTypeID) { + String oldSpecializedDiagramTypeID = specializedDiagramTypeID; + specializedDiagramTypeID = newSpecializedDiagramTypeID; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID, oldSpecializedDiagramTypeID, specializedDiagramTypeID)); + } + + /** + * + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch(featureID) { + case ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: + return getSpecializedDiagramTypeID(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch(featureID) { + case ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: + setSpecializedDiagramTypeID((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: + setSpecializedDiagramTypeID(SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch(featureID) { + case ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION__SPECIALIZED_DIAGRAM_TYPE_ID: + return SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT == null ? specializedDiagramTypeID != null : !SPECIALIZED_DIAGRAM_TYPE_ID_EDEFAULT.equals(specializedDiagramTypeID); + } + return super.eIsSet(featureID); + } + + /** + * + * + * + * @generated + */ + @Override + public String toString() { + if(eIsProxy()) + return super.toString(); + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (specializedDiagramTypeID: "); //$NON-NLS-1$ + result.append(specializedDiagramTypeID); + result.append(')'); + return result.toString(); + } +} //ViewTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/HierarchyPermission.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/HierarchyPermission.java new file mode 100644 index 00000000000..64b24097ebb --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/HierarchyPermission.java @@ -0,0 +1,114 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Hierarchy Permission'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#getChildType Child Type}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsPermitted Is Permitted}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsStrict Is Strict}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#getHierarchyPermission() + * @model + * @generated + */ +public interface HierarchyPermission extends EObject { + /** + * Returns the value of the 'Child Type' attribute. + * + *

    + * If the meaning of the 'Child Type' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Child Type' attribute. + * @see #setChildType(String) + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#getHierarchyPermission_ChildType() + * @model + * @generated + */ + String getChildType(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#getChildType Child Type}' attribute. + * + * + * @param value the new value of the 'Child Type' attribute. + * @see #getChildType() + * @generated + */ + void setChildType(String value); + + /** + * Returns the value of the 'Is Permitted' attribute. + * + *

    + * If the meaning of the 'Is Permitted' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Is Permitted' attribute. + * @see #setIsPermitted(boolean) + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#getHierarchyPermission_IsPermitted() + * @model + * @generated + */ + boolean isIsPermitted(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsPermitted Is Permitted}' attribute. + * + * + * @param value the new value of the 'Is Permitted' attribute. + * @see #isIsPermitted() + * @generated + */ + void setIsPermitted(boolean value); + + /** + * Returns the value of the 'Is Strict' attribute. + * + *

    + * If the meaning of the 'Is Strict' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Is Strict' attribute. + * @see #setIsStrict(boolean) + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#getHierarchyPermission_IsStrict() + * @model + * @generated + */ + boolean isIsStrict(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsStrict Is Strict}' attribute. + * + * + * @param value the new value of the 'Is Strict' attribute. + * @see #isIsStrict() + * @generated + */ + void setIsStrict(boolean value); + +} // HierarchyPermission diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfiguration.java new file mode 100644 index 00000000000..7dc30a18add --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfiguration.java @@ -0,0 +1,52 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; + +/** + * + * A representation of the model object 'Invariant Container Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration#getPermissions Permissions}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#getInvariantContainerConfiguration() + * @model + * @generated + */ +public interface InvariantContainerConfiguration extends InvariantRuleConfiguration { + /** + * Returns the value of the 'Permissions' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission}. + * + *

    + * If the meaning of the 'Permissions' containment reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Permissions' containment reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#getInvariantContainerConfiguration_Permissions() + * @model containment="true" + * @generated + */ + EList getPermissions(); + +} // InvariantContainerConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationFactory.java new file mode 100644 index 00000000000..06db3f6f21d --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationFactory.java @@ -0,0 +1,61 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage + * @generated + */ +public interface InvariantContainerConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + InvariantContainerConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Invariant Container Configuration'. + * + * + * @return a new object of class 'Invariant Container Configuration'. + * @generated + */ + InvariantContainerConfiguration createInvariantContainerConfiguration(); + + /** + * Returns a new object of class 'Hierarchy Permission'. + * + * + * @return a new object of class 'Hierarchy Permission'. + * @generated + */ + HierarchyPermission createHierarchyPermission(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + InvariantContainerConfigurationPackage getInvariantContainerConfigurationPackage(); + +} //InvariantContainerConfigurationFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationPackage.java new file mode 100644 index 00000000000..e78d78b9685 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationPackage.java @@ -0,0 +1,305 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationFactory + * @model kind="package" + * @generated + */ +public interface InvariantContainerConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "invariantcontainerconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/container/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "invariantcontainerconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + InvariantContainerConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationImpl Invariant Container Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationPackageImpl#getInvariantContainerConfiguration() + * @generated + */ + int INVARIANT_CONTAINER_CONFIGURATION = 0; + + /** + * The feature id for the 'Permissions' containment reference list. + * + * + * @generated + * @ordered + */ + int INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Invariant Container Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_CONTAINER_CONFIGURATION_FEATURE_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Invariant Container Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_CONTAINER_CONFIGURATION_OPERATION_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl Hierarchy Permission}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationPackageImpl#getHierarchyPermission() + * @generated + */ + int HIERARCHY_PERMISSION = 1; + + /** + * The feature id for the 'Child Type' attribute. + * + * + * @generated + * @ordered + */ + int HIERARCHY_PERMISSION__CHILD_TYPE = 0; + + /** + * The feature id for the 'Is Permitted' attribute. + * + * + * @generated + * @ordered + */ + int HIERARCHY_PERMISSION__IS_PERMITTED = 1; + + /** + * The feature id for the 'Is Strict' attribute. + * + * + * @generated + * @ordered + */ + int HIERARCHY_PERMISSION__IS_STRICT = 2; + + /** + * The number of structural features of the 'Hierarchy Permission' class. + * + * + * @generated + * @ordered + */ + int HIERARCHY_PERMISSION_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Hierarchy Permission' class. + * + * + * @generated + * @ordered + */ + int HIERARCHY_PERMISSION_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration Invariant Container Configuration}'. + * + * + * @return the meta object for class 'Invariant Container Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration + * @generated + */ + EClass getInvariantContainerConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration#getPermissions Permissions}'. + * + * + * @return the meta object for the containment reference list 'Permissions'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration#getPermissions() + * @see #getInvariantContainerConfiguration() + * @generated + */ + EReference getInvariantContainerConfiguration_Permissions(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission Hierarchy Permission}'. + * + * + * @return the meta object for class 'Hierarchy Permission'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission + * @generated + */ + EClass getHierarchyPermission(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#getChildType Child Type}'. + * + * + * @return the meta object for the attribute 'Child Type'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#getChildType() + * @see #getHierarchyPermission() + * @generated + */ + EAttribute getHierarchyPermission_ChildType(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsPermitted Is Permitted}'. + * + * + * @return the meta object for the attribute 'Is Permitted'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsPermitted() + * @see #getHierarchyPermission() + * @generated + */ + EAttribute getHierarchyPermission_IsPermitted(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsStrict Is Strict}'. + * + * + * @return the meta object for the attribute 'Is Strict'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission#isIsStrict() + * @see #getHierarchyPermission() + * @generated + */ + EAttribute getHierarchyPermission_IsStrict(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + InvariantContainerConfigurationFactory getInvariantContainerConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationImpl Invariant Container Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationPackageImpl#getInvariantContainerConfiguration() + * @generated + */ + EClass INVARIANT_CONTAINER_CONFIGURATION = eINSTANCE.getInvariantContainerConfiguration(); + + /** + * The meta object literal for the 'Permissions' containment reference list feature. + * + * + * @generated + */ + EReference INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS = eINSTANCE.getInvariantContainerConfiguration_Permissions(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl Hierarchy Permission}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationPackageImpl#getHierarchyPermission() + * @generated + */ + EClass HIERARCHY_PERMISSION = eINSTANCE.getHierarchyPermission(); + + /** + * The meta object literal for the 'Child Type' attribute feature. + * + * + * @generated + */ + EAttribute HIERARCHY_PERMISSION__CHILD_TYPE = eINSTANCE.getHierarchyPermission_ChildType(); + + /** + * The meta object literal for the 'Is Permitted' attribute feature. + * + * + * @generated + */ + EAttribute HIERARCHY_PERMISSION__IS_PERMITTED = eINSTANCE.getHierarchyPermission_IsPermitted(); + + /** + * The meta object literal for the 'Is Strict' attribute feature. + * + * + * @generated + */ + EAttribute HIERARCHY_PERMISSION__IS_STRICT = eINSTANCE.getHierarchyPermission_IsStrict(); + + } + +} //InvariantContainerConfigurationPackage diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/HierarchyPermissionImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/HierarchyPermissionImpl.java new file mode 100644 index 00000000000..d6d6327f010 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/HierarchyPermissionImpl.java @@ -0,0 +1,281 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage; + +/** + * + * An implementation of the model object 'Hierarchy Permission'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl#getChildType Child Type}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl#isIsPermitted Is Permitted}
    • + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.HierarchyPermissionImpl#isIsStrict Is Strict}
    • + *
    + *

    + * + * @generated + */ +public class HierarchyPermissionImpl extends MinimalEObjectImpl.Container implements HierarchyPermission { + /** + * The default value of the '{@link #getChildType() Child Type}' attribute. + * + * + * @see #getChildType() + * @generated + * @ordered + */ + protected static final String CHILD_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChildType() Child Type}' attribute. + * + * + * @see #getChildType() + * @generated + * @ordered + */ + protected String childType = CHILD_TYPE_EDEFAULT; + + /** + * The default value of the '{@link #isIsPermitted() Is Permitted}' attribute. + * + * + * @see #isIsPermitted() + * @generated + * @ordered + */ + protected static final boolean IS_PERMITTED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIsPermitted() Is Permitted}' attribute. + * + * + * @see #isIsPermitted() + * @generated + * @ordered + */ + protected boolean isPermitted = IS_PERMITTED_EDEFAULT; + + /** + * The default value of the '{@link #isIsStrict() Is Strict}' attribute. + * + * + * @see #isIsStrict() + * @generated + * @ordered + */ + protected static final boolean IS_STRICT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIsStrict() Is Strict}' attribute. + * + * + * @see #isIsStrict() + * @generated + * @ordered + */ + protected boolean isStrict = IS_STRICT_EDEFAULT; + + /** + * + * + * @generated + */ + protected HierarchyPermissionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantContainerConfigurationPackage.Literals.HIERARCHY_PERMISSION; + } + + /** + * + * + * @generated + */ + public String getChildType() { + return childType; + } + + /** + * + * + * @generated + */ + public void setChildType(String newChildType) { + String oldChildType = childType; + childType = newChildType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__CHILD_TYPE, oldChildType, childType)); + } + + /** + * + * + * @generated + */ + public boolean isIsPermitted() { + return isPermitted; + } + + /** + * + * + * @generated + */ + public void setIsPermitted(boolean newIsPermitted) { + boolean oldIsPermitted = isPermitted; + isPermitted = newIsPermitted; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_PERMITTED, oldIsPermitted, isPermitted)); + } + + /** + * + * + * @generated + */ + public boolean isIsStrict() { + return isStrict; + } + + /** + * + * + * @generated + */ + public void setIsStrict(boolean newIsStrict) { + boolean oldIsStrict = isStrict; + isStrict = newIsStrict; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_STRICT, oldIsStrict, isStrict)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__CHILD_TYPE: + return getChildType(); + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_PERMITTED: + return isIsPermitted(); + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_STRICT: + return isIsStrict(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__CHILD_TYPE: + setChildType((String)newValue); + return; + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_PERMITTED: + setIsPermitted((Boolean)newValue); + return; + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_STRICT: + setIsStrict((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__CHILD_TYPE: + setChildType(CHILD_TYPE_EDEFAULT); + return; + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_PERMITTED: + setIsPermitted(IS_PERMITTED_EDEFAULT); + return; + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_STRICT: + setIsStrict(IS_STRICT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__CHILD_TYPE: + return CHILD_TYPE_EDEFAULT == null ? childType != null : !CHILD_TYPE_EDEFAULT.equals(childType); + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_PERMITTED: + return isPermitted != IS_PERMITTED_EDEFAULT; + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION__IS_STRICT: + return isStrict != IS_STRICT_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (childType: "); + result.append(childType); + result.append(", isPermitted: "); + result.append(isPermitted); + result.append(", isStrict: "); + result.append(isStrict); + result.append(')'); + return result.toString(); + } + +} //HierarchyPermissionImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationFactoryImpl.java new file mode 100644 index 00000000000..b6ec732b1a0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationFactoryImpl.java @@ -0,0 +1,116 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class InvariantContainerConfigurationFactoryImpl extends EFactoryImpl implements InvariantContainerConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static InvariantContainerConfigurationFactory init() { + try { + InvariantContainerConfigurationFactory theInvariantContainerConfigurationFactory = (InvariantContainerConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(InvariantContainerConfigurationPackage.eNS_URI); + if (theInvariantContainerConfigurationFactory != null) { + return theInvariantContainerConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new InvariantContainerConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public InvariantContainerConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION: return createInvariantContainerConfiguration(); + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION: return createHierarchyPermission(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public InvariantContainerConfiguration createInvariantContainerConfiguration() { + InvariantContainerConfigurationImpl invariantContainerConfiguration = new InvariantContainerConfigurationImpl(); + return invariantContainerConfiguration; + } + + /** + * + * + * @generated + */ + public HierarchyPermission createHierarchyPermission() { + HierarchyPermissionImpl hierarchyPermission = new HierarchyPermissionImpl(); + return hierarchyPermission; + } + + /** + * + * + * @generated + */ + public InvariantContainerConfigurationPackage getInvariantContainerConfigurationPackage() { + return (InvariantContainerConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static InvariantContainerConfigurationPackage getPackage() { + return InvariantContainerConfigurationPackage.eINSTANCE; + } + +} //InvariantContainerConfigurationFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationImpl.java new file mode 100644 index 00000000000..6f4291b0d16 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationImpl.java @@ -0,0 +1,162 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl; + +/** + * + * An implementation of the model object 'Invariant Container Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl.InvariantContainerConfigurationImpl#getPermissions Permissions}
    • + *
    + *

    + * + * @generated + */ +public class InvariantContainerConfigurationImpl extends InvariantRuleConfigurationImpl implements InvariantContainerConfiguration { + /** + * The cached value of the '{@link #getPermissions() Permissions}' containment reference list. + * + * + * @see #getPermissions() + * @generated + * @ordered + */ + protected EList permissions; + + /** + * + * + * @generated + */ + protected InvariantContainerConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantContainerConfigurationPackage.Literals.INVARIANT_CONTAINER_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getPermissions() { + if (permissions == null) { + permissions = new EObjectContainmentEList(HierarchyPermission.class, this, InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS); + } + return permissions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS: + return ((InternalEList)getPermissions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS: + return getPermissions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS: + getPermissions().clear(); + getPermissions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS: + getPermissions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS: + return permissions != null && !permissions.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //InvariantContainerConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationPackageImpl.java new file mode 100644 index 00000000000..0b48d2a219f --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/impl/InvariantContainerConfigurationPackageImpl.java @@ -0,0 +1,253 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationFactory; +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class InvariantContainerConfigurationPackageImpl extends EPackageImpl implements InvariantContainerConfigurationPackage { + /** + * + * + * @generated + */ + private EClass invariantContainerConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass hierarchyPermissionEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private InvariantContainerConfigurationPackageImpl() { + super(eNS_URI, InvariantContainerConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link InvariantContainerConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static InvariantContainerConfigurationPackage init() { + if (isInited) return (InvariantContainerConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(InvariantContainerConfigurationPackage.eNS_URI); + + // Obtain or create and register package + InvariantContainerConfigurationPackageImpl theInvariantContainerConfigurationPackage = (InvariantContainerConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InvariantContainerConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InvariantContainerConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + InvariantSemanticTypeConfigurationPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theInvariantContainerConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theInvariantContainerConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theInvariantContainerConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(InvariantContainerConfigurationPackage.eNS_URI, theInvariantContainerConfigurationPackage); + return theInvariantContainerConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getInvariantContainerConfiguration() { + return invariantContainerConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getInvariantContainerConfiguration_Permissions() { + return (EReference)invariantContainerConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getHierarchyPermission() { + return hierarchyPermissionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHierarchyPermission_ChildType() { + return (EAttribute)hierarchyPermissionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getHierarchyPermission_IsPermitted() { + return (EAttribute)hierarchyPermissionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getHierarchyPermission_IsStrict() { + return (EAttribute)hierarchyPermissionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public InvariantContainerConfigurationFactory getInvariantContainerConfigurationFactory() { + return (InvariantContainerConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + invariantContainerConfigurationEClass = createEClass(INVARIANT_CONTAINER_CONFIGURATION); + createEReference(invariantContainerConfigurationEClass, INVARIANT_CONTAINER_CONFIGURATION__PERMISSIONS); + + hierarchyPermissionEClass = createEClass(HIERARCHY_PERMISSION); + createEAttribute(hierarchyPermissionEClass, HIERARCHY_PERMISSION__CHILD_TYPE); + createEAttribute(hierarchyPermissionEClass, HIERARCHY_PERMISSION__IS_PERMITTED); + createEAttribute(hierarchyPermissionEClass, HIERARCHY_PERMISSION__IS_STRICT); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + InvariantSemanticTypeConfigurationPackage theInvariantSemanticTypeConfigurationPackage = (InvariantSemanticTypeConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(InvariantSemanticTypeConfigurationPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + invariantContainerConfigurationEClass.getESuperTypes().add(theInvariantSemanticTypeConfigurationPackage.getInvariantRuleConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(invariantContainerConfigurationEClass, InvariantContainerConfiguration.class, "InvariantContainerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getInvariantContainerConfiguration_Permissions(), this.getHierarchyPermission(), null, "permissions", null, 0, -1, InvariantContainerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(hierarchyPermissionEClass, HierarchyPermission.class, "HierarchyPermission", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getHierarchyPermission_ChildType(), theEcorePackage.getEString(), "childType", null, 0, 1, HierarchyPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHierarchyPermission_IsPermitted(), theEcorePackage.getEBoolean(), "isPermitted", null, 0, 1, HierarchyPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHierarchyPermission_IsStrict(), theEcorePackage.getEBoolean(), "isStrict", null, 0, 1, HierarchyPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //InvariantContainerConfigurationPackageImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationAdapterFactory.java new file mode 100644 index 00000000000..8c5fefb68b8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationAdapterFactory.java @@ -0,0 +1,168 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.*; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage + * @generated + */ +public class InvariantContainerConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static InvariantContainerConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public InvariantContainerConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = InvariantContainerConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected InvariantContainerConfigurationSwitch modelSwitch = + new InvariantContainerConfigurationSwitch() { + @Override + public Adapter caseInvariantContainerConfiguration(InvariantContainerConfiguration object) { + return createInvariantContainerConfigurationAdapter(); + } + @Override + public Adapter caseHierarchyPermission(HierarchyPermission object) { + return createHierarchyPermissionAdapter(); + } + @Override + public Adapter caseInvariantRuleConfiguration(InvariantRuleConfiguration object) { + return createInvariantRuleConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration Invariant Container Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfiguration + * @generated + */ + public Adapter createInvariantContainerConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission Hierarchy Permission}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.HierarchyPermission + * @generated + */ + public Adapter createHierarchyPermissionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration Invariant Rule Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration + * @generated + */ + public Adapter createInvariantRuleConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //InvariantContainerConfigurationAdapterFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..01fbf941306 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceFactoryImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util.InvariantContainerConfigurationResourceImpl + * @generated + */ +public class InvariantContainerConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public InvariantContainerConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new InvariantContainerConfigurationResourceImpl(uri); + return result; + } + +} //InvariantContainerConfigurationResourceFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceImpl.java new file mode 100644 index 00000000000..dddb5c63901 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationResourceImpl.java @@ -0,0 +1,38 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util.InvariantContainerConfigurationResourceFactoryImpl + * @generated + */ +public class InvariantContainerConfigurationResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public InvariantContainerConfigurationResourceImpl(URI uri) { + super(uri); + } + +} //InvariantContainerConfigurationResourceImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationSwitch.java new file mode 100644 index 00000000000..e4cf186efed --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationSwitch.java @@ -0,0 +1,159 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.*; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage + * @generated + */ +public class InvariantContainerConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static InvariantContainerConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public InvariantContainerConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = InvariantContainerConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case InvariantContainerConfigurationPackage.INVARIANT_CONTAINER_CONFIGURATION: { + InvariantContainerConfiguration invariantContainerConfiguration = (InvariantContainerConfiguration)theEObject; + T result = caseInvariantContainerConfiguration(invariantContainerConfiguration); + if (result == null) result = caseInvariantRuleConfiguration(invariantContainerConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InvariantContainerConfigurationPackage.HIERARCHY_PERMISSION: { + HierarchyPermission hierarchyPermission = (HierarchyPermission)theEObject; + T result = caseHierarchyPermission(hierarchyPermission); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Invariant Container Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Invariant Container Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInvariantContainerConfiguration(InvariantContainerConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Hierarchy Permission'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Hierarchy Permission'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHierarchyPermission(HierarchyPermission object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Invariant Rule Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Invariant Rule Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInvariantRuleConfiguration(InvariantRuleConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //InvariantContainerConfigurationSwitch diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationXMLProcessor.java new file mode 100644 index 00000000000..21ab3121a20 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/util/InvariantContainerConfigurationXMLProcessor.java @@ -0,0 +1,60 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + +import org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration.InvariantContainerConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class InvariantContainerConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public InvariantContainerConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + InvariantContainerConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the InvariantContainerConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new InvariantContainerConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new InvariantContainerConfigurationResourceFactoryImpl()); + } + return registrations; + } + +} //InvariantContainerConfigurationXMLProcessor diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRule.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRule.java new file mode 100644 index 00000000000..17c85e07773 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRule.java @@ -0,0 +1,27 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + + +/** + * + * A representation of the model object 'And Rule'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getAndRule() + * @model + * @generated + */ +public interface AndRule extends ComposedRuleConfiguration { +} // AndRule diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/ComposedRuleConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/ComposedRuleConfiguration.java new file mode 100644 index 00000000000..34466596454 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/ComposedRuleConfiguration.java @@ -0,0 +1,50 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Composed Rule Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration#getComposedRules Composed Rules}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getComposedRuleConfiguration() + * @model abstract="true" + * @generated + */ +public interface ComposedRuleConfiguration extends InvariantRuleConfiguration { + /** + * Returns the value of the 'Composed Rules' reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration}. + * + *

    + * If the meaning of the 'Composed Rules' reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Composed Rules' reference list. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getComposedRuleConfiguration_ComposedRules() + * @model lower="2" + * @generated + */ + EList getComposedRules(); + +} // ComposedRuleConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantRuleConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantRuleConfiguration.java new file mode 100644 index 00000000000..c7e48284973 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantRuleConfiguration.java @@ -0,0 +1,28 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Invariant Rule Configuration'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getInvariantRuleConfiguration() + * @model abstract="true" + * @generated + */ +public interface InvariantRuleConfiguration extends EObject { +} // InvariantRuleConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfiguration.java new file mode 100644 index 00000000000..7441500ef55 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfiguration.java @@ -0,0 +1,60 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration; + +/** + * + * A representation of the model object 'Invariant Semantic Type Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration#getInvariantRuleConfiguration Invariant Rule Configuration}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getInvariantSemanticTypeConfiguration() + * @model + * @generated + */ +public interface InvariantSemanticTypeConfiguration extends SemanticTypeConfiguration { + /** + * Returns the value of the 'Invariant Rule Configuration' containment reference. + * + *

    + * If the meaning of the 'Invariant Rule Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Invariant Rule Configuration' containment reference. + * @see #setInvariantRuleConfiguration(InvariantRuleConfiguration) + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration() + * @model containment="true" required="true" + * @generated + */ + InvariantRuleConfiguration getInvariantRuleConfiguration(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration#getInvariantRuleConfiguration Invariant Rule Configuration}' containment reference. + * + * + * @param value the new value of the 'Invariant Rule Configuration' containment reference. + * @see #getInvariantRuleConfiguration() + * @generated + */ + void setInvariantRuleConfiguration(InvariantRuleConfiguration value); + +} // InvariantSemanticTypeConfiguration diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationFactory.java new file mode 100644 index 00000000000..7699c597ee5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationFactory.java @@ -0,0 +1,70 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage + * @generated + */ +public interface InvariantSemanticTypeConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + InvariantSemanticTypeConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Invariant Semantic Type Configuration'. + * + * + * @return a new object of class 'Invariant Semantic Type Configuration'. + * @generated + */ + InvariantSemanticTypeConfiguration createInvariantSemanticTypeConfiguration(); + + /** + * Returns a new object of class 'And Rule'. + * + * + * @return a new object of class 'And Rule'. + * @generated + */ + AndRule createAndRule(); + + /** + * Returns a new object of class 'Or Rule'. + * + * + * @return a new object of class 'Or Rule'. + * @generated + */ + OrRule createOrRule(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + InvariantSemanticTypeConfigurationPackage getInvariantSemanticTypeConfigurationPackage(); + +} //InvariantSemanticTypeConfigurationFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationPackage.java new file mode 100644 index 00000000000..5eee19838f8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeConfigurationPackage.java @@ -0,0 +1,473 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationFactory + * @model kind="package" + * @generated + */ +public interface InvariantSemanticTypeConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "invariantsemantictypeconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "invariantsemantictypeconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + InvariantSemanticTypeConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationImpl Invariant Semantic Type Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getInvariantSemanticTypeConfiguration() + * @generated + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__ICON_ENTRY; + + /** + * The feature id for the 'Hint' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__HINT = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__HINT; + + /** + * The feature id for the 'Kind Name' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__KIND_NAME = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__KIND_NAME; + + /** + * The feature id for the 'Specialized Types ID' attribute list. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__SPECIALIZED_TYPES_ID; + + /** + * The feature id for the 'Matcher Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__MATCHER_CONFIGURATION = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION__MATCHER_CONFIGURATION; + + /** + * The feature id for the 'Invariant Rule Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Invariant Semantic Type Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl Invariant Rule Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getInvariantRuleConfiguration() + * @generated + */ + int INVARIANT_RULE_CONFIGURATION = 1; + + /** + * The number of structural features of the 'Invariant Rule Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Invariant Rule Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_RULE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.ComposedRuleConfigurationImpl Composed Rule Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.ComposedRuleConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getComposedRuleConfiguration() + * @generated + */ + int COMPOSED_RULE_CONFIGURATION = 2; + + /** + * The feature id for the 'Composed Rules' reference list. + * + * + * @generated + * @ordered + */ + int COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES = INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Composed Rule Configuration' class. + * + * + * @generated + * @ordered + */ + int COMPOSED_RULE_CONFIGURATION_FEATURE_COUNT = INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Composed Rule Configuration' class. + * + * + * @generated + * @ordered + */ + int COMPOSED_RULE_CONFIGURATION_OPERATION_COUNT = INVARIANT_RULE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.AndRuleImpl And Rule}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.AndRuleImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getAndRule() + * @generated + */ + int AND_RULE = 3; + + /** + * The feature id for the 'Composed Rules' reference list. + * + * + * @generated + * @ordered + */ + int AND_RULE__COMPOSED_RULES = COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES; + + /** + * The number of structural features of the 'And Rule' class. + * + * + * @generated + * @ordered + */ + int AND_RULE_FEATURE_COUNT = COMPOSED_RULE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'And Rule' class. + * + * + * @generated + * @ordered + */ + int AND_RULE_OPERATION_COUNT = COMPOSED_RULE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.OrRuleImpl Or Rule}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.OrRuleImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getOrRule() + * @generated + */ + int OR_RULE = 4; + + /** + * The feature id for the 'Composed Rules' reference list. + * + * + * @generated + * @ordered + */ + int OR_RULE__COMPOSED_RULES = COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES; + + /** + * The number of structural features of the 'Or Rule' class. + * + * + * @generated + * @ordered + */ + int OR_RULE_FEATURE_COUNT = COMPOSED_RULE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Or Rule' class. + * + * + * @generated + * @ordered + */ + int OR_RULE_OPERATION_COUNT = COMPOSED_RULE_CONFIGURATION_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration Invariant Semantic Type Configuration}'. + * + * + * @return the meta object for class 'Invariant Semantic Type Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration + * @generated + */ + EClass getInvariantSemanticTypeConfiguration(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration#getInvariantRuleConfiguration Invariant Rule Configuration}'. + * + * + * @return the meta object for the containment reference 'Invariant Rule Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration#getInvariantRuleConfiguration() + * @see #getInvariantSemanticTypeConfiguration() + * @generated + */ + EReference getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration Invariant Rule Configuration}'. + * + * + * @return the meta object for class 'Invariant Rule Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration + * @generated + */ + EClass getInvariantRuleConfiguration(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration Composed Rule Configuration}'. + * + * + * @return the meta object for class 'Composed Rule Configuration'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration + * @generated + */ + EClass getComposedRuleConfiguration(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration#getComposedRules Composed Rules}'. + * + * + * @return the meta object for the reference list 'Composed Rules'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration#getComposedRules() + * @see #getComposedRuleConfiguration() + * @generated + */ + EReference getComposedRuleConfiguration_ComposedRules(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule And Rule}'. + * + * + * @return the meta object for class 'And Rule'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule + * @generated + */ + EClass getAndRule(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule Or Rule}'. + * + * + * @return the meta object for class 'Or Rule'. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule + * @generated + */ + EClass getOrRule(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + InvariantSemanticTypeConfigurationFactory getInvariantSemanticTypeConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationImpl Invariant Semantic Type Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getInvariantSemanticTypeConfiguration() + * @generated + */ + EClass INVARIANT_SEMANTIC_TYPE_CONFIGURATION = eINSTANCE.getInvariantSemanticTypeConfiguration(); + + /** + * The meta object literal for the 'Invariant Rule Configuration' containment reference feature. + * + * + * @generated + */ + EReference INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION = eINSTANCE.getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl Invariant Rule Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getInvariantRuleConfiguration() + * @generated + */ + EClass INVARIANT_RULE_CONFIGURATION = eINSTANCE.getInvariantRuleConfiguration(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.ComposedRuleConfigurationImpl Composed Rule Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.ComposedRuleConfigurationImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getComposedRuleConfiguration() + * @generated + */ + EClass COMPOSED_RULE_CONFIGURATION = eINSTANCE.getComposedRuleConfiguration(); + + /** + * The meta object literal for the 'Composed Rules' reference list feature. + * + * + * @generated + */ + EReference COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES = eINSTANCE.getComposedRuleConfiguration_ComposedRules(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.AndRuleImpl And Rule}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.AndRuleImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getAndRule() + * @generated + */ + EClass AND_RULE = eINSTANCE.getAndRule(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.OrRuleImpl Or Rule}' class. + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.OrRuleImpl + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationPackageImpl#getOrRule() + * @generated + */ + EClass OR_RULE = eINSTANCE.getOrRule(); + + } + +} //InvariantSemanticTypeConfigurationPackage diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRule.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRule.java new file mode 100644 index 00000000000..ee768d800fd --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRule.java @@ -0,0 +1,27 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + + +/** + * + * A representation of the model object 'Or Rule'. + * + * + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#getOrRule() + * @model + * @generated + */ +public interface OrRule extends ComposedRuleConfiguration { +} // OrRule diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/AndRuleImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/AndRuleImpl.java new file mode 100644 index 00000000000..6a66b58904c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/AndRuleImpl.java @@ -0,0 +1,49 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * An implementation of the model object 'And Rule'. + * + *

    + *

    + * + * @generated + */ +public class AndRuleImpl extends ComposedRuleConfigurationImpl implements AndRule { + /** + * + * + * @generated + */ + protected AndRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantSemanticTypeConfigurationPackage.Literals.AND_RULE; + } + +} //AndRuleImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/ComposedRuleConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/ComposedRuleConfigurationImpl.java new file mode 100644 index 00000000000..21faea9770e --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/ComposedRuleConfigurationImpl.java @@ -0,0 +1,142 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * An implementation of the model object 'Composed Rule Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.ComposedRuleConfigurationImpl#getComposedRules Composed Rules}
    • + *
    + *

    + * + * @generated + */ +public abstract class ComposedRuleConfigurationImpl extends InvariantRuleConfigurationImpl implements ComposedRuleConfiguration { + /** + * The cached value of the '{@link #getComposedRules() Composed Rules}' reference list. + * + * + * @see #getComposedRules() + * @generated + * @ordered + */ + protected EList composedRules; + + /** + * + * + * @generated + */ + protected ComposedRuleConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantSemanticTypeConfigurationPackage.Literals.COMPOSED_RULE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getComposedRules() { + if (composedRules == null) { + composedRules = new EObjectResolvingEList(InvariantRuleConfiguration.class, this, InvariantSemanticTypeConfigurationPackage.COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES); + } + return composedRules; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES: + return getComposedRules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES: + getComposedRules().clear(); + getComposedRules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES: + getComposedRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES: + return composedRules != null && !composedRules.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ComposedRuleConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantRuleConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantRuleConfigurationImpl.java new file mode 100644 index 00000000000..e9b2a6df9d5 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantRuleConfigurationImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * An implementation of the model object 'Invariant Rule Configuration'. + * + *

    + *

    + * + * @generated + */ +public abstract class InvariantRuleConfigurationImpl extends MinimalEObjectImpl.Container implements InvariantRuleConfiguration { + /** + * + * + * @generated + */ + protected InvariantRuleConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantSemanticTypeConfigurationPackage.Literals.INVARIANT_RULE_CONFIGURATION; + } + +} //InvariantRuleConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationFactoryImpl.java new file mode 100644 index 00000000000..963f8c448df --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationFactoryImpl.java @@ -0,0 +1,127 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class InvariantSemanticTypeConfigurationFactoryImpl extends EFactoryImpl implements InvariantSemanticTypeConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static InvariantSemanticTypeConfigurationFactory init() { + try { + InvariantSemanticTypeConfigurationFactory theInvariantSemanticTypeConfigurationFactory = (InvariantSemanticTypeConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(InvariantSemanticTypeConfigurationPackage.eNS_URI); + if (theInvariantSemanticTypeConfigurationFactory != null) { + return theInvariantSemanticTypeConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new InvariantSemanticTypeConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION: return createInvariantSemanticTypeConfiguration(); + case InvariantSemanticTypeConfigurationPackage.AND_RULE: return createAndRule(); + case InvariantSemanticTypeConfigurationPackage.OR_RULE: return createOrRule(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public InvariantSemanticTypeConfiguration createInvariantSemanticTypeConfiguration() { + InvariantSemanticTypeConfigurationImpl invariantSemanticTypeConfiguration = new InvariantSemanticTypeConfigurationImpl(); + return invariantSemanticTypeConfiguration; + } + + /** + * + * + * @generated + */ + public AndRule createAndRule() { + AndRuleImpl andRule = new AndRuleImpl(); + return andRule; + } + + /** + * + * + * @generated + */ + public OrRule createOrRule() { + OrRuleImpl orRule = new OrRuleImpl(); + return orRule; + } + + /** + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationPackage getInvariantSemanticTypeConfigurationPackage() { + return (InvariantSemanticTypeConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static InvariantSemanticTypeConfigurationPackage getPackage() { + return InvariantSemanticTypeConfigurationPackage.eINSTANCE; + } + +} //InvariantSemanticTypeConfigurationFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationImpl.java new file mode 100644 index 00000000000..1e44293af95 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationImpl.java @@ -0,0 +1,187 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticTypeConfigurationImpl; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * An implementation of the model object 'Invariant Semantic Type Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantSemanticTypeConfigurationImpl#getInvariantRuleConfiguration Invariant Rule Configuration}
    • + *
    + *

    + * + * @generated + */ +public class InvariantSemanticTypeConfigurationImpl extends SemanticTypeConfigurationImpl implements InvariantSemanticTypeConfiguration { + /** + * The cached value of the '{@link #getInvariantRuleConfiguration() Invariant Rule Configuration}' containment reference. + * + * + * @see #getInvariantRuleConfiguration() + * @generated + * @ordered + */ + protected InvariantRuleConfiguration invariantRuleConfiguration; + + /** + * + * + * @generated + */ + protected InvariantSemanticTypeConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantSemanticTypeConfigurationPackage.Literals.INVARIANT_SEMANTIC_TYPE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public InvariantRuleConfiguration getInvariantRuleConfiguration() { + return invariantRuleConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInvariantRuleConfiguration(InvariantRuleConfiguration newInvariantRuleConfiguration, NotificationChain msgs) { + InvariantRuleConfiguration oldInvariantRuleConfiguration = invariantRuleConfiguration; + invariantRuleConfiguration = newInvariantRuleConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION, oldInvariantRuleConfiguration, newInvariantRuleConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setInvariantRuleConfiguration(InvariantRuleConfiguration newInvariantRuleConfiguration) { + if (newInvariantRuleConfiguration != invariantRuleConfiguration) { + NotificationChain msgs = null; + if (invariantRuleConfiguration != null) + msgs = ((InternalEObject)invariantRuleConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION, null, msgs); + if (newInvariantRuleConfiguration != null) + msgs = ((InternalEObject)newInvariantRuleConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION, null, msgs); + msgs = basicSetInvariantRuleConfiguration(newInvariantRuleConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION, newInvariantRuleConfiguration, newInvariantRuleConfiguration)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION: + return basicSetInvariantRuleConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION: + return getInvariantRuleConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION: + setInvariantRuleConfiguration((InvariantRuleConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION: + setInvariantRuleConfiguration((InvariantRuleConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION: + return invariantRuleConfiguration != null; + } + return super.eIsSet(featureID); + } + +} //InvariantSemanticTypeConfigurationImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationPackageImpl.java new file mode 100644 index 00000000000..fe050d0066c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/InvariantSemanticTypeConfigurationPackageImpl.java @@ -0,0 +1,294 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationFactory; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class InvariantSemanticTypeConfigurationPackageImpl extends EPackageImpl implements InvariantSemanticTypeConfigurationPackage { + /** + * + * + * @generated + */ + private EClass invariantSemanticTypeConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass invariantRuleConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass composedRuleConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass andRuleEClass = null; + + /** + * + * + * @generated + */ + private EClass orRuleEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private InvariantSemanticTypeConfigurationPackageImpl() { + super(eNS_URI, InvariantSemanticTypeConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link InvariantSemanticTypeConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static InvariantSemanticTypeConfigurationPackage init() { + if (isInited) return (InvariantSemanticTypeConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(InvariantSemanticTypeConfigurationPackage.eNS_URI); + + // Obtain or create and register package + InvariantSemanticTypeConfigurationPackageImpl theInvariantSemanticTypeConfigurationPackage = (InvariantSemanticTypeConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InvariantSemanticTypeConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InvariantSemanticTypeConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ExtendedtypesPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theInvariantSemanticTypeConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theInvariantSemanticTypeConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theInvariantSemanticTypeConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(InvariantSemanticTypeConfigurationPackage.eNS_URI, theInvariantSemanticTypeConfigurationPackage); + return theInvariantSemanticTypeConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getInvariantSemanticTypeConfiguration() { + return invariantSemanticTypeConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration() { + return (EReference)invariantSemanticTypeConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getInvariantRuleConfiguration() { + return invariantRuleConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EClass getComposedRuleConfiguration() { + return composedRuleConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getComposedRuleConfiguration_ComposedRules() { + return (EReference)composedRuleConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getAndRule() { + return andRuleEClass; + } + + /** + * + * + * @generated + */ + public EClass getOrRule() { + return orRuleEClass; + } + + /** + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationFactory getInvariantSemanticTypeConfigurationFactory() { + return (InvariantSemanticTypeConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + invariantSemanticTypeConfigurationEClass = createEClass(INVARIANT_SEMANTIC_TYPE_CONFIGURATION); + createEReference(invariantSemanticTypeConfigurationEClass, INVARIANT_SEMANTIC_TYPE_CONFIGURATION__INVARIANT_RULE_CONFIGURATION); + + invariantRuleConfigurationEClass = createEClass(INVARIANT_RULE_CONFIGURATION); + + composedRuleConfigurationEClass = createEClass(COMPOSED_RULE_CONFIGURATION); + createEReference(composedRuleConfigurationEClass, COMPOSED_RULE_CONFIGURATION__COMPOSED_RULES); + + andRuleEClass = createEClass(AND_RULE); + + orRuleEClass = createEClass(OR_RULE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + invariantSemanticTypeConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticTypeConfiguration()); + composedRuleConfigurationEClass.getESuperTypes().add(this.getInvariantRuleConfiguration()); + andRuleEClass.getESuperTypes().add(this.getComposedRuleConfiguration()); + orRuleEClass.getESuperTypes().add(this.getComposedRuleConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(invariantSemanticTypeConfigurationEClass, InvariantSemanticTypeConfiguration.class, "InvariantSemanticTypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getInvariantSemanticTypeConfiguration_InvariantRuleConfiguration(), this.getInvariantRuleConfiguration(), null, "invariantRuleConfiguration", null, 1, 1, InvariantSemanticTypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(invariantRuleConfigurationEClass, InvariantRuleConfiguration.class, "InvariantRuleConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(composedRuleConfigurationEClass, ComposedRuleConfiguration.class, "ComposedRuleConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getComposedRuleConfiguration_ComposedRules(), this.getInvariantRuleConfiguration(), null, "composedRules", null, 2, -1, ComposedRuleConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(andRuleEClass, AndRule.class, "AndRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(orRuleEClass, OrRule.class, "OrRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //InvariantSemanticTypeConfigurationPackageImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/OrRuleImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/OrRuleImpl.java new file mode 100644 index 00000000000..cbdab1d11ff --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/impl/OrRuleImpl.java @@ -0,0 +1,49 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule; + +/** + * + * An implementation of the model object 'Or Rule'. + * + *

    + *

    + * + * @generated + */ +public class OrRuleImpl extends ComposedRuleConfigurationImpl implements OrRule { + /** + * + * + * @generated + */ + protected OrRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantSemanticTypeConfigurationPackage.Literals.OR_RULE; + } + +} //OrRuleImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationAdapterFactory.java new file mode 100644 index 00000000000..3773f4efda0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationAdapterFactory.java @@ -0,0 +1,260 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage + * @generated + */ +public class InvariantSemanticTypeConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static InvariantSemanticTypeConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = InvariantSemanticTypeConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected InvariantSemanticTypeConfigurationSwitch modelSwitch = + new InvariantSemanticTypeConfigurationSwitch() { + @Override + public Adapter caseInvariantSemanticTypeConfiguration(InvariantSemanticTypeConfiguration object) { + return createInvariantSemanticTypeConfigurationAdapter(); + } + @Override + public Adapter caseInvariantRuleConfiguration(InvariantRuleConfiguration object) { + return createInvariantRuleConfigurationAdapter(); + } + @Override + public Adapter caseComposedRuleConfiguration(ComposedRuleConfiguration object) { + return createComposedRuleConfigurationAdapter(); + } + @Override + public Adapter caseAndRule(AndRule object) { + return createAndRuleAdapter(); + } + @Override + public Adapter caseOrRule(OrRule object) { + return createOrRuleAdapter(); + } + @Override + public Adapter caseConfigurationElement(ConfigurationElement object) { + return createConfigurationElementAdapter(); + } + @Override + public Adapter caseElementTypeConfiguration(ElementTypeConfiguration object) { + return createElementTypeConfigurationAdapter(); + } + @Override + public Adapter caseSemanticTypeConfiguration(SemanticTypeConfiguration object) { + return createSemanticTypeConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration Invariant Semantic Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfiguration + * @generated + */ + public Adapter createInvariantSemanticTypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration Invariant Rule Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration + * @generated + */ + public Adapter createInvariantRuleConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration Composed Rule Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.ComposedRuleConfiguration + * @generated + */ + public Adapter createComposedRuleConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule And Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.AndRule + * @generated + */ + public Adapter createAndRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule Or Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.OrRule + * @generated + */ + public Adapter createOrRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + public Adapter createConfigurationElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration Element Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration + * @generated + */ + public Adapter createElementTypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration Semantic Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration + * @generated + */ + public Adapter createSemanticTypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //InvariantSemanticTypeConfigurationAdapterFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..55974c31d8a --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceFactoryImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util.InvariantSemanticTypeConfigurationResourceImpl + * @generated + */ +public class InvariantSemanticTypeConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new InvariantSemanticTypeConfigurationResourceImpl(uri); + return result; + } + +} //InvariantSemanticTypeConfigurationResourceFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceImpl.java new file mode 100644 index 00000000000..295cf87c056 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationResourceImpl.java @@ -0,0 +1,38 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util.InvariantSemanticTypeConfigurationResourceFactoryImpl + * @generated + */ +public class InvariantSemanticTypeConfigurationResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public InvariantSemanticTypeConfigurationResourceImpl(URI uri) { + super(uri); + } + +} //InvariantSemanticTypeConfigurationResourceImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationSwitch.java new file mode 100644 index 00000000000..eef47b13987 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationSwitch.java @@ -0,0 +1,261 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage + * @generated + */ +public class InvariantSemanticTypeConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static InvariantSemanticTypeConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = InvariantSemanticTypeConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case InvariantSemanticTypeConfigurationPackage.INVARIANT_SEMANTIC_TYPE_CONFIGURATION: { + InvariantSemanticTypeConfiguration invariantSemanticTypeConfiguration = (InvariantSemanticTypeConfiguration)theEObject; + T result = caseInvariantSemanticTypeConfiguration(invariantSemanticTypeConfiguration); + if (result == null) result = caseSemanticTypeConfiguration(invariantSemanticTypeConfiguration); + if (result == null) result = caseElementTypeConfiguration(invariantSemanticTypeConfiguration); + if (result == null) result = caseConfigurationElement(invariantSemanticTypeConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION: { + InvariantRuleConfiguration invariantRuleConfiguration = (InvariantRuleConfiguration)theEObject; + T result = caseInvariantRuleConfiguration(invariantRuleConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InvariantSemanticTypeConfigurationPackage.COMPOSED_RULE_CONFIGURATION: { + ComposedRuleConfiguration composedRuleConfiguration = (ComposedRuleConfiguration)theEObject; + T result = caseComposedRuleConfiguration(composedRuleConfiguration); + if (result == null) result = caseInvariantRuleConfiguration(composedRuleConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InvariantSemanticTypeConfigurationPackage.AND_RULE: { + AndRule andRule = (AndRule)theEObject; + T result = caseAndRule(andRule); + if (result == null) result = caseComposedRuleConfiguration(andRule); + if (result == null) result = caseInvariantRuleConfiguration(andRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InvariantSemanticTypeConfigurationPackage.OR_RULE: { + OrRule orRule = (OrRule)theEObject; + T result = caseOrRule(orRule); + if (result == null) result = caseComposedRuleConfiguration(orRule); + if (result == null) result = caseInvariantRuleConfiguration(orRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Invariant Semantic Type Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Invariant Semantic Type Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInvariantSemanticTypeConfiguration(InvariantSemanticTypeConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Invariant Rule Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Invariant Rule Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInvariantRuleConfiguration(InvariantRuleConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Composed Rule Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Composed Rule Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComposedRuleConfiguration(ComposedRuleConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'And Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'And Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAndRule(AndRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Or Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Or Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrRule(OrRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationElement(ConfigurationElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Element Type Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Type Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseElementTypeConfiguration(ElementTypeConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Semantic Type Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Semantic Type Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticTypeConfiguration(SemanticTypeConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //InvariantSemanticTypeConfigurationSwitch diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationXMLProcessor.java new file mode 100644 index 00000000000..6e8ba050b2f --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/util/InvariantSemanticTypeConfigurationXMLProcessor.java @@ -0,0 +1,60 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class InvariantSemanticTypeConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public InvariantSemanticTypeConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + InvariantSemanticTypeConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the InvariantSemanticTypeConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new InvariantSemanticTypeConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new InvariantSemanticTypeConfigurationResourceFactoryImpl()); + } + return registrations; + } + +} //InvariantSemanticTypeConfigurationXMLProcessor diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesAdapterFactory.java index bc9ac57f2ee..4cf0a80afa4 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesAdapterFactory.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesAdapterFactory.java @@ -1,36 +1,42 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.util; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; + import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.IconEntry; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.*; /** * * The Adapter Factory for the model. * It provides an adapter createXXX method for each class of the model. * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage * @generated */ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { + /** * The cached model package. * * + * * @generated */ protected static ExtendedtypesPackage modelPackage; @@ -39,10 +45,11 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { * Creates an instance of the adapter factory. * * + * * @generated */ public ExtendedtypesAdapterFactory() { - if (modelPackage == null) { + if(modelPackage == null) { modelPackage = ExtendedtypesPackage.eINSTANCE; } } @@ -52,15 +59,16 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { * * This implementation returns true if the object is either the model's package or is an instance object of the model. * + * * @return whether this factory is applicable for the type of the object. * @generated */ @Override public boolean isFactoryForType(Object object) { - if (object == modelPackage) { + if(object == modelPackage) { return true; } - if (object instanceof EObject) { + if(object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; @@ -70,45 +78,89 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { * The switch that delegates to the createXXX methods. * * + * * @generated */ - protected ExtendedtypesSwitch modelSwitch = - new ExtendedtypesSwitch() { - @Override - public Adapter caseExtendedElementTypeSet(ExtendedElementTypeSet object) { - return createExtendedElementTypeSetAdapter(); - } - @Override - public Adapter caseExtendedElementTypeConfiguration(ExtendedElementTypeConfiguration object) { - return createExtendedElementTypeConfigurationAdapter(); - } - @Override - public Adapter caseIconEntry(IconEntry object) { - return createIconEntryAdapter(); - } - @Override - public Adapter caseActionConfiguration(ActionConfiguration object) { - return createActionConfigurationAdapter(); - } - @Override - public Adapter casePreActionConfiguration(PreActionConfiguration object) { - return createPreActionConfigurationAdapter(); - } - @Override - public Adapter casePostActionConfiguration(PostActionConfiguration object) { - return createPostActionConfigurationAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; + protected ExtendedtypesSwitch modelSwitch = new ExtendedtypesSwitch() { + + @Override + public Adapter caseExtendedElementTypeSet(ExtendedElementTypeSet object) { + return createExtendedElementTypeSetAdapter(); + } + + @Override + public Adapter caseElementTypeConfiguration(ElementTypeConfiguration object) { + return createElementTypeConfigurationAdapter(); + } + + @Override + public Adapter caseIconEntry(IconEntry object) { + return createIconEntryAdapter(); + } + + @Override + public Adapter caseConfigurationElement(ConfigurationElement object) { + return createConfigurationElementAdapter(); + } + + @Override + public Adapter caseMatcherConfiguration(MatcherConfiguration object) { + return createMatcherConfigurationAdapter(); + } + + @Override + public Adapter caseActionConfiguration(ActionConfiguration object) { + return createActionConfigurationAdapter(); + } + + @Override + public Adapter caseViewActionConfiguration(ViewActionConfiguration object) { + return createViewActionConfigurationAdapter(); + } + + @Override + public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return createSemanticActionConfigurationAdapter(); + } + + @Override + public Adapter caseSemanticTypeConfiguration(SemanticTypeConfiguration object) { + return createSemanticTypeConfigurationAdapter(); + } + + @Override + public Adapter caseViewTypeConfiguration(ViewTypeConfiguration object) { + return createViewTypeConfigurationAdapter(); + } + + @Override + public Adapter caseElementTypeAdviceConfiguration(ElementTypeAdviceConfiguration object) { + return createElementTypeAdviceConfigurationAdapter(); + } + + @Override + public Adapter caseAspectSemanticTypeConfiguration(AspectSemanticTypeConfiguration object) { + return createAspectSemanticTypeConfigurationAdapter(); + } + + @Override + public Adapter caseAspectViewTypeConfiguration(AspectViewTypeConfiguration object) { + return createAspectViewTypeConfigurationAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; /** * Creates an adapter for the target. * * - * @param target the object to adapt. + * + * @param target + * the object to adapt. * @return the adapter for the target. * @generated */ @@ -117,13 +169,14 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { return modelSwitch.doSwitch((EObject)target); } - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet Extended Element Type Set}'. + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet + * Extended Element Type Set}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * + * * @return the new adapter. * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet * @generated @@ -133,16 +186,18 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration Extended Element Type Configuration}'. + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration + * Element Type Configuration}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * + * * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration * @generated */ - public Adapter createExtendedElementTypeConfigurationAdapter() { + public Adapter createElementTypeConfigurationAdapter() { return null; } @@ -152,6 +207,7 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * + * * @return the new adapter. * @see org.eclipse.papyrus.infra.extendedtypes.IconEntry * @generated @@ -161,11 +217,45 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * Configuration Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + public Adapter createConfigurationElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration + * Matcher Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration + * @generated + */ + public Adapter createMatcherConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration} + * '. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * + * * @return the new adapter. * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration * @generated @@ -175,30 +265,114 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration Pre Action Configuration}'. + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration + * View Action Configuration}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * + * * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration + * @see org.eclipse.papyrus.infra.extendedtypes.ViewActionConfiguration * @generated */ - public Adapter createPreActionConfigurationAdapter() { + public Adapter createViewActionConfigurationAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration Post Action Configuration}'. + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration + * Semantic Action Configuration}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * + * * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration * @generated */ - public Adapter createPostActionConfigurationAdapter() { + public Adapter createSemanticActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration + * Semantic Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticTypeConfiguration + * @generated + */ + public Adapter createSemanticTypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration + * View Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ViewTypeConfiguration + * @generated + */ + public Adapter createViewTypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration + * Element Type Advice Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ElementTypeAdviceConfiguration + * @generated + */ + public Adapter createElementTypeAdviceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration + * Aspect Semantic Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.AspectSemanticTypeConfiguration + * @generated + */ + public Adapter createAspectSemanticTypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration + * Aspect View Type Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration + * @generated + */ + public Adapter createAspectViewTypeConfigurationAdapter() { return null; } @@ -207,11 +381,11 @@ public class ExtendedtypesAdapterFactory extends AdapterFactoryImpl { * * This default implementation returns null. * + * * @return the new adapter. * @generated */ public Adapter createEObjectAdapter() { return null; } - } //ExtendedtypesAdapterFactory diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceFactoryImpl.java index 0fda74342f9..59edf4547d6 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceFactoryImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceFactoryImpl.java @@ -1,28 +1,38 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.util; import org.eclipse.emf.common.util.URI; + import org.eclipse.emf.ecore.resource.Resource; + import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; -import org.eclipse.emf.ecore.xmi.XMLResource; /** * * The Resource Factory associated with the package. * + * * @see org.eclipse.papyrus.infra.extendedtypes.util.ExtendedtypesResourceImpl * @generated */ public class ExtendedtypesResourceFactoryImpl extends ResourceFactoryImpl { + /** * Creates an instance of the resource factory. * * + * * @generated */ public ExtendedtypesResourceFactoryImpl() { @@ -33,21 +43,12 @@ public class ExtendedtypesResourceFactoryImpl extends ResourceFactoryImpl { * Creates an instance of the resource. * * + * * @generated */ @Override public Resource createResource(URI uri) { - XMLResource result = new ExtendedtypesResourceImpl(uri); - result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - - result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); + Resource result = new ExtendedtypesResourceImpl(uri); return result; } - } //ExtendedtypesResourceFactoryImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceImpl.java index eb895d14091..432ba94cd22 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceImpl.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesResourceImpl.java @@ -1,31 +1,41 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.util; import org.eclipse.emf.common.util.URI; + import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; /** * * The Resource associated with the package. * + * * @see org.eclipse.papyrus.infra.extendedtypes.util.ExtendedtypesResourceFactoryImpl * @generated */ public class ExtendedtypesResourceImpl extends XMLResourceImpl { + /** * Creates an instance of the resource. * * - * @param uri the URI of the new resource. + * + * @param uri + * the URI of the new resource. * @generated */ public ExtendedtypesResourceImpl(URI uri) { super(uri); } - } //ExtendedtypesResourceImpl diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesSwitch.java index e38f3a7a666..49c8d3f741c 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesSwitch.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesSwitch.java @@ -1,40 +1,44 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.util; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.util.Switch; -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; -import org.eclipse.papyrus.infra.extendedtypes.IconEntry; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.*; /** * * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX method for each class of the model, + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for each class of the model, * starting with the actual class of the object * and proceeding up the inheritance hierarchy * until a non-null result is returned, * which is the result of the switch. * + * * @see org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage * @generated */ public class ExtendedtypesSwitch extends Switch { + /** * The cached model package * * + * * @generated */ protected static ExtendedtypesPackage modelPackage; @@ -43,10 +47,11 @@ public class ExtendedtypesSwitch extends Switch { * Creates an instance of the switch. * * + * * @generated */ public ExtendedtypesSwitch() { - if (modelPackage == null) { + if(modelPackage == null) { modelPackage = ExtendedtypesPackage.eINSTANCE; } } @@ -55,6 +60,7 @@ public class ExtendedtypesSwitch extends Switch { * Checks whether this is a switch for the given package. * * + * * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated @@ -68,51 +74,155 @@ public class ExtendedtypesSwitch extends Switch { * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * * + * * @return the first non-null result returned by a caseXXX call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET: { - ExtendedElementTypeSet extendedElementTypeSet = (ExtendedElementTypeSet)theEObject; - T result = caseExtendedElementTypeSet(extendedElementTypeSet); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_CONFIGURATION: { - ExtendedElementTypeConfiguration extendedElementTypeConfiguration = (ExtendedElementTypeConfiguration)theEObject; - T result = caseExtendedElementTypeConfiguration(extendedElementTypeConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ExtendedtypesPackage.ICON_ENTRY: { - IconEntry iconEntry = (IconEntry)theEObject; - T result = caseIconEntry(iconEntry); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ExtendedtypesPackage.ACTION_CONFIGURATION: { - ActionConfiguration actionConfiguration = (ActionConfiguration)theEObject; - T result = caseActionConfiguration(actionConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ExtendedtypesPackage.PRE_ACTION_CONFIGURATION: { - PreActionConfiguration preActionConfiguration = (PreActionConfiguration)theEObject; - T result = casePreActionConfiguration(preActionConfiguration); - if (result == null) result = caseActionConfiguration(preActionConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ExtendedtypesPackage.POST_ACTION_CONFIGURATION: { - PostActionConfiguration postActionConfiguration = (PostActionConfiguration)theEObject; - T result = casePostActionConfiguration(postActionConfiguration); - if (result == null) result = caseActionConfiguration(postActionConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); + switch(classifierID) { + case ExtendedtypesPackage.EXTENDED_ELEMENT_TYPE_SET: + { + ExtendedElementTypeSet extendedElementTypeSet = (ExtendedElementTypeSet)theEObject; + T result = caseExtendedElementTypeSet(extendedElementTypeSet); + if(result == null) + result = caseConfigurationElement(extendedElementTypeSet); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.ELEMENT_TYPE_CONFIGURATION: + { + ElementTypeConfiguration elementTypeConfiguration = (ElementTypeConfiguration)theEObject; + T result = caseElementTypeConfiguration(elementTypeConfiguration); + if(result == null) + result = caseConfigurationElement(elementTypeConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.ICON_ENTRY: + { + IconEntry iconEntry = (IconEntry)theEObject; + T result = caseIconEntry(iconEntry); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.CONFIGURATION_ELEMENT: + { + ConfigurationElement configurationElement = (ConfigurationElement)theEObject; + T result = caseConfigurationElement(configurationElement); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.MATCHER_CONFIGURATION: + { + MatcherConfiguration matcherConfiguration = (MatcherConfiguration)theEObject; + T result = caseMatcherConfiguration(matcherConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.ACTION_CONFIGURATION: + { + ActionConfiguration actionConfiguration = (ActionConfiguration)theEObject; + T result = caseActionConfiguration(actionConfiguration); + if(result == null) + result = caseConfigurationElement(actionConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.VIEW_ACTION_CONFIGURATION: + { + ViewActionConfiguration viewActionConfiguration = (ViewActionConfiguration)theEObject; + T result = caseViewActionConfiguration(viewActionConfiguration); + if(result == null) + result = caseActionConfiguration(viewActionConfiguration); + if(result == null) + result = caseConfigurationElement(viewActionConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION: + { + SemanticActionConfiguration semanticActionConfiguration = (SemanticActionConfiguration)theEObject; + T result = caseSemanticActionConfiguration(semanticActionConfiguration); + if(result == null) + result = caseActionConfiguration(semanticActionConfiguration); + if(result == null) + result = caseConfigurationElement(semanticActionConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.SEMANTIC_TYPE_CONFIGURATION: + { + SemanticTypeConfiguration semanticTypeConfiguration = (SemanticTypeConfiguration)theEObject; + T result = caseSemanticTypeConfiguration(semanticTypeConfiguration); + if(result == null) + result = caseElementTypeConfiguration(semanticTypeConfiguration); + if(result == null) + result = caseConfigurationElement(semanticTypeConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.VIEW_TYPE_CONFIGURATION: + { + ViewTypeConfiguration viewTypeConfiguration = (ViewTypeConfiguration)theEObject; + T result = caseViewTypeConfiguration(viewTypeConfiguration); + if(result == null) + result = caseElementTypeConfiguration(viewTypeConfiguration); + if(result == null) + result = caseConfigurationElement(viewTypeConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.ELEMENT_TYPE_ADVICE_CONFIGURATION: + { + ElementTypeAdviceConfiguration elementTypeAdviceConfiguration = (ElementTypeAdviceConfiguration)theEObject; + T result = caseElementTypeAdviceConfiguration(elementTypeAdviceConfiguration); + if(result == null) + result = caseConfigurationElement(elementTypeAdviceConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.ASPECT_SEMANTIC_TYPE_CONFIGURATION: + { + AspectSemanticTypeConfiguration aspectSemanticTypeConfiguration = (AspectSemanticTypeConfiguration)theEObject; + T result = caseAspectSemanticTypeConfiguration(aspectSemanticTypeConfiguration); + if(result == null) + result = caseSemanticTypeConfiguration(aspectSemanticTypeConfiguration); + if(result == null) + result = caseElementTypeConfiguration(aspectSemanticTypeConfiguration); + if(result == null) + result = caseConfigurationElement(aspectSemanticTypeConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ExtendedtypesPackage.ASPECT_VIEW_TYPE_CONFIGURATION: + { + AspectViewTypeConfiguration aspectViewTypeConfiguration = (AspectViewTypeConfiguration)theEObject; + T result = caseAspectViewTypeConfiguration(aspectViewTypeConfiguration); + if(result == null) + result = caseViewTypeConfiguration(aspectViewTypeConfiguration); + if(result == null) + result = caseElementTypeConfiguration(aspectViewTypeConfiguration); + if(result == null) + result = caseConfigurationElement(aspectViewTypeConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); } } @@ -122,7 +232,9 @@ public class ExtendedtypesSwitch extends Switch { * This implementation returns null; * returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Extended Element Type Set'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -132,17 +244,19 @@ public class ExtendedtypesSwitch extends Switch { } /** - * Returns the result of interpreting the object as an instance of 'Extended Element Type Configuration'. + * Returns the result of interpreting the object as an instance of 'Element Type Configuration'. * * This implementation returns null; * returning a non-null result will terminate the switch. * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Extended Element Type Configuration'. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Type Configuration'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseExtendedElementTypeConfiguration(ExtendedElementTypeConfiguration object) { + public T caseElementTypeConfiguration(ElementTypeConfiguration object) { return null; } @@ -152,7 +266,9 @@ public class ExtendedtypesSwitch extends Switch { * This implementation returns null; * returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Icon Entry'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -161,13 +277,49 @@ public class ExtendedtypesSwitch extends Switch { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Configuration Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationElement(ConfigurationElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Matcher Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Matcher Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMatcherConfiguration(MatcherConfiguration object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Action Configuration'. * * This implementation returns null; * returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Action Configuration'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -177,32 +329,121 @@ public class ExtendedtypesSwitch extends Switch { } /** - * Returns the result of interpreting the object as an instance of 'Pre Action Configuration'. + * Returns the result of interpreting the object as an instance of 'View Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'View Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseViewActionConfiguration(ViewActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Semantic Type Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Semantic Type Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticTypeConfiguration(SemanticTypeConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'View Type Configuration'. * * This implementation returns null; * returning a non-null result will terminate the switch. * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Pre Action Configuration'. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'View Type Configuration'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T casePreActionConfiguration(PreActionConfiguration object) { + public T caseViewTypeConfiguration(ViewTypeConfiguration object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Post Action Configuration'. + * Returns the result of interpreting the object as an instance of 'Element Type Advice Configuration'. * * This implementation returns null; * returning a non-null result will terminate the switch. * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Post Action Configuration'. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Type Advice Configuration'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T casePostActionConfiguration(PostActionConfiguration object) { + public T caseElementTypeAdviceConfiguration(ElementTypeAdviceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Aspect Semantic Type Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Aspect Semantic Type Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAspectSemanticTypeConfiguration(AspectSemanticTypeConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Aspect View Type Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Aspect View Type Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAspectViewTypeConfiguration(AspectViewTypeConfiguration object) { return null; } @@ -212,7 +453,9 @@ public class ExtendedtypesSwitch extends Switch { * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated @@ -221,5 +464,4 @@ public class ExtendedtypesSwitch extends Switch { public T defaultCase(EObject object) { return null; } - } //ExtendedtypesSwitch diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesXMLProcessor.java index 96c0319a58c..cc706b9d3ae 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesXMLProcessor.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/util/ExtendedtypesXMLProcessor.java @@ -1,22 +1,32 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.infra.extendedtypes.util; import java.util.Map; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.resource.Resource; + import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; /** * This class contains helper methods to serialize and deserialize XML documents * * + * * @generated */ public class ExtendedtypesXMLProcessor extends XMLProcessor { @@ -25,27 +35,28 @@ public class ExtendedtypesXMLProcessor extends XMLProcessor { * Public constructor to instantiate the helper. * * + * * @generated */ public ExtendedtypesXMLProcessor() { super((EPackage.Registry.INSTANCE)); ExtendedtypesPackage.eINSTANCE.eClass(); } - + /** * Register for "*" and "xml" file extensions the ExtendedtypesResourceFactoryImpl factory. * * + * * @generated */ @Override protected Map getRegistrations() { - if (registrations == null) { + if(registrations == null) { super.getRegistrations(); registrations.put(XML_EXTENSION, new ExtendedtypesResourceFactoryImpl()); registrations.put(STAR_EXTENSION, new ExtendedtypesResourceFactoryImpl()); } return registrations; } - } //ExtendedtypesXMLProcessor diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AbstractConfigurableElementTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AbstractConfigurableElementTypeFactory.java new file mode 100644 index 00000000000..e45cc02f473 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AbstractConfigurableElementTypeFactory.java @@ -0,0 +1,119 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.IconEntry; +import org.eclipse.papyrus.infra.extendedtypes.types.ExtendedHintedElementType; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; +import org.osgi.framework.Bundle; + +/** + * Factory to create element type from its {@link ElementTypeConfiguration} + */ +public abstract class AbstractConfigurableElementTypeFactory implements IExtendedElementTypeFactory { + + /** + * {@inheritDoc} + */ + public IExtendedHintedElementType createElementType(T configuration) { + String id = configuration.getIdentifier(); + // display name of the element Type (used mainly in GUIs) + String displayName = configuration.getName(); + // Specialized element types + List specializedTypes = new ArrayList(configuration.getSpecializedTypesID().size()); + for(String specializedTypeId : configuration.getSpecializedTypesID()) { + IElementType specializedType = ElementTypeRegistry.getInstance().getType(specializedTypeId); + specializedTypes.add(specializedType); + } + IElementType[] elementTypes = specializedTypes.toArray(new IElementType[]{}); + // icon associated to the element Type (GUI) + IconEntry entry = configuration.getIconEntry(); + URL iconURL = null; + if(entry != null) { + iconURL = getURLFromEntry(entry); + } + IExtendedHintedElementType type = new ExtendedHintedElementType(id, iconURL, displayName, elementTypes, createElementMatcher(configuration), createContainerDescriptor(configuration), createEditHelperAdvice(configuration), getSemanticHint(configuration), createElementCreationValidator(configuration)); + return type; + } + + /** + * Returns the semantic hint for the element type from the given configuration + */ + protected String getSemanticHint(T configuration) { + return configuration.getHint(); + } + + /** + * @param configuration + * @return + */ + protected abstract IEditHelperAdvice createEditHelperAdvice(T configuration); + + /** + * @param configuration + * @return + */ + protected abstract IContainerDescriptor createContainerDescriptor(T configuration); + + /** + * Creates the element matcher for the given configuration + * @param configuration the configuration from which element matcher should be created + * @return the new element matcher for the created element type + */ + protected IElementMatcher createElementMatcher(T configuration) { + MatcherConfiguration matcherConfiguration = configuration.getMatcherConfiguration(); + if(matcherConfiguration==null) { + return null; + } + // create matcher from the configuration + IElementMatcher matcher = ConfigurableElementMatcherFactoryRegistry.getInstance().createElementMatcher(matcherConfiguration); + return matcher; + } + + /** + * {@inheritDoc} + */ + public abstract ICreationElementValidator createElementCreationValidator(T configuration) ; + + /** + * @param entry + * @return + */ + protected URL getURLFromEntry(IconEntry entry) { + Bundle bundle = Platform.getBundle(entry.getBundleId()); + if(bundle == null) { + return null; + } + URL result = bundle.getEntry(entry.getIconPath()); + if(result == null) { + try { + result = new URL(entry.getIconPath()); + } catch (MalformedURLException e) { + result = null; + } + } + return result; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/Activator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/Activator.java index 6a325c5357d..712e63367a5 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/Activator.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/Activator.java @@ -1,58 +1,59 @@ -package org.eclipse.papyrus.infra.extendedtypes; - -import org.eclipse.papyrus.infra.core.log.LogHelper; -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.extendedtypes"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** Logging helper */ - public static LogHelper log; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - log = new LogHelper(this); - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - @Override - public void stop(BundleContext context) throws Exception { - log = null; - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +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.extendedtypes"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** Logging helper */ + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + log = null; + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectConfigurationFactoryRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectConfigurationFactoryRegistry.java new file mode 100644 index 00000000000..5f6d2d90cad --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectConfigurationFactoryRegistry.java @@ -0,0 +1,386 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.lang.ref.WeakReference; +import java.util.Collections; +import java.util.Dictionary; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.osgi.framework.Bundle; + +/** + * Registry that manages all possible pre/post action configurations + */ +public class AspectConfigurationFactoryRegistry { + + /** private singleton instance */ + private static AspectConfigurationFactoryRegistry registry; + + /** map configuration type to matcher descriptor */ + protected Map configurationTypeToClassDescriptor = null; + + /** + * returns the singleton instance of this registry + * + * @return the singleton instance of this registry + */ + public static synchronized AspectConfigurationFactoryRegistry getInstance() { + if(registry == null) { + registry = new AspectConfigurationFactoryRegistry(); + registry.init(); + } + return registry; + } + + /** + * Inits the registry. + */ + protected void init() { + configurationTypeToClassDescriptor = new HashMap(); + //read invariant rule configuration etension point + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IAspectTypeExtensionPoint.EXTENSION_POINT_ID); + // for each element, parses and retrieve the model file. then loads it and returns the root element + for(IConfigurationElement configurationElement : elements) { + // contributor will always be the same, but implementation could be different. + String contributorName = configurationElement.getContributor().getName(); + + String configurationClass = configurationElement.getAttribute(IAspectTypeExtensionPoint.CONFIGURATION_CLASS); + + String editHelperAdviceClassName = configurationElement.getAttribute(IAspectTypeExtensionPoint.EDIT_HELPER_ADVICE_CLASS); + String containerDescriptorClassName = configurationElement.getAttribute(IAspectTypeExtensionPoint.CONTAINER_DESCRIPTOR_CLASS); + String creationElementValidatorClassName = configurationElement.getAttribute(IAspectTypeExtensionPoint.CREATION_ELEMENT_VALIDATOR_CLASS); + + ConfigurableClassDescriptor configurableClassDescriptor = new ConfigurableClassDescriptor(contributorName, editHelperAdviceClassName, contributorName, containerDescriptorClassName, contributorName, creationElementValidatorClassName); + configurationTypeToClassDescriptor.put(configurationClass, configurableClassDescriptor); + } + + } + + /** + * @param ruleConfiguration + * @return + */ + public IContainerDescriptor createContainerDescriptor(ActionConfiguration ruleConfiguration) { + Class> containerDescriptorClass = getContainerDescriptorClass(ruleConfiguration); + if(containerDescriptorClass == null) { + return null; + } + try { + IActionContainerDescriptor containerDescriptor = containerDescriptorClass.newInstance(); + if(containerDescriptor != null) { + containerDescriptor.init(ruleConfiguration); + } + return containerDescriptor; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + /** + * @param actionConfiguration + * @return + */ + public IEditHelperAdvice createEditHelperAdvice(ActionConfiguration actionConfiguration) { + Class> editHelperAdviceClass = getEditHelperAdviceClass(actionConfiguration); + if(editHelperAdviceClass == null) { + Activator.log.error("impossible to find the edit helper advice implementation for configuration type : " + ((actionConfiguration!=null) ? actionConfiguration.eClass().getName() : "null"), null); + return null; + } + try { + IActionEditHelperAdvice editHelperAdvice = editHelperAdviceClass.newInstance(); + if(editHelperAdvice != null) { + editHelperAdvice.init(actionConfiguration); + } + return editHelperAdvice; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + /** + * @param ruleConfiguration + * @return + */ + public ICreationElementValidator createCreationElementValidator(ActionConfiguration actionConfiguration) { + Class> creationElementValidatorClass = getCreationElementValidatorClass(actionConfiguration); + if(creationElementValidatorClass == null) { + Activator.log.error("impossible to find the Creation Element Validator for configuration type : " + ((actionConfiguration!=null) ? actionConfiguration.eClass().getName() : "null"), null); + return null; + } + try { + IActionCreationElementValidator creationElementValidator = creationElementValidatorClass.newInstance(); + if(creationElementValidator != null) { + creationElementValidator.init(actionConfiguration); + } + return creationElementValidator; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + + /** + * @param ruleConfiguration + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getCreationElementValidatorClass(ActionConfiguration configuration) { + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getCreationElementValidatorClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getCreationElementValidatorContributorName(); + // look in the list of registered matcher for the right one + if(className == null) { + Activator.log.error("There should be an implementation class for the configuration "+configurationType+ " from contributor "+contributorName, null); + } else if(contributorName != null) { + return (Class>)loadClass(className, contributorName); + } + return null; + } + + /** + * @param configurationType + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getEditHelperAdviceClass(ActionConfiguration configuration) { + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getEditHelperAdviceClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getEditHelperAdviceContributorName(); + + // look in the list of registered edit helper advices for the right one + return (Class>)loadClass(className, contributorName); + } + + /** + * @param configurationType + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getContainerDescriptorClass(ActionConfiguration configuration) { + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getContainerDescriptorClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getContainerDescriptorContributorName(); + + + // look in the list of registered edit helper advices for the right one + if(className !=null && contributorName !=null) { + return (Class>)loadClass(className, contributorName); + } + return null; + } + + protected static class ConfigurableClassDescriptor { + + /** + * @param editHelperAdviceContributorName + * @param editHelperAdviceClassName + * @param containerDescriptorContributorName + * @param containerDescriptorClassName + */ + public ConfigurableClassDescriptor(String editHelperAdviceContributorName, String editHelperAdviceClassName, String containerDescriptorContributorName, String containerDescriptorClassName, String creationElementValidatorContributorName, String creationElementValidatorClassName) { + this.editHelperAdviceContributorName = editHelperAdviceContributorName; + this.editHelperAdviceClassName = editHelperAdviceClassName; + this.containerDescriptorContributorName = containerDescriptorContributorName; + this.containerDescriptorClassName = containerDescriptorClassName; + this.creationElementValidatorContributorName = creationElementValidatorContributorName; + this.creationElementValidatorClassName = creationElementValidatorClassName; + } + + private final String editHelperAdviceContributorName; + + private final String editHelperAdviceClassName; + + private final String containerDescriptorContributorName; + + private final String containerDescriptorClassName; + + private final String creationElementValidatorContributorName; + + private final String creationElementValidatorClassName; + + /** + * @return + */ + public String getCreationElementValidatorContributorName() { + return creationElementValidatorContributorName; + } + + /** + * @return + */ + public String getCreationElementValidatorClassName() { + return creationElementValidatorClassName; + } + + /** + * @return the editHelperAdviceContributorName + */ + public String getEditHelperAdviceContributorName() { + return editHelperAdviceContributorName; + } + + + /** + * @return the editHelperAdviceClassName + */ + public String getEditHelperAdviceClassName() { + return editHelperAdviceClassName; + } + + + /** + * @return the containerDescriptorContributorName + */ + public String getContainerDescriptorContributorName() { + return containerDescriptorContributorName; + } + + + /** + * @return the containerDescriptorClassName + */ + public String getContainerDescriptorClassName() { + return containerDescriptorClassName; + } + + } + + /////////////////////////////////////////////////////////////////////////// + // loading resource + /////////////////////////////////////////////////////////////////////////// + /** A map of classes that have been successfully loaded, keyed on the class name optionally prepended by the plugin ID, if specified. */ + private static Map>> successLookupTable = new HashMap>>(); + + /** A map of classes that could not be loaded, keyed on the class name, optionally prepended by the plugin ID if specified. */ + private static Set failureLookupTable = new HashSet(); + + /** A map to hold the bundle to exception list */ + private static Map> bundleToExceptionsSetMap = new HashMap>(); + + /** + * A utility method to load a class using its name and a given class loader. + * + * @param className + * The class name + * @param bundle + * The class loader + * @return The loaded class or null if could not be loaded + */ + protected static Class loadClass(String className, String pluginId) { + StringBuffer keyStringBuf = new StringBuffer(className.length() + pluginId.length() + 2); // 2 is for . and extra. + keyStringBuf.append(pluginId); + keyStringBuf.append('.'); + keyStringBuf.append(className); + String keyString = keyStringBuf.toString(); + WeakReference> ref = successLookupTable.get(keyString); + Class found = (ref != null) ? ref.get() : null; + if(found == null) { + if(ref != null) + successLookupTable.remove(keyString); + if(!failureLookupTable.contains(keyString)) { + try { + Bundle bundle = basicGetPluginBundle(pluginId); + if(bundle != null) { + // never load the class if the bundle is not active other wise + // we will cause the plugin to load + // unless the class is in the exception list + int state = bundle.getState(); + if(state == org.osgi.framework.Bundle.ACTIVE || isInExceptionList(bundle, className)) { + found = bundle.loadClass(className); + successLookupTable.put(keyString, new WeakReference>(found)); + if(state == org.osgi.framework.Bundle.ACTIVE) { + bundleToExceptionsSetMap.remove(bundle); + } + } + } else { + failureLookupTable.add(keyString); + } + } catch (ClassNotFoundException e) { + failureLookupTable.add(keyString); + } + } + } + return found; + } + + /** + * Given a bundle id, it checks if the bundle is found and activated. If it + * is, the method returns the bundle, otherwise it returns null. + * + * @param pluginId + * the bundle ID + * @return the bundle, if found + */ + protected static Bundle getPluginBundle(String pluginId) { + Bundle bundle = basicGetPluginBundle(pluginId); + if(null != bundle && bundle.getState() == org.osgi.framework.Bundle.ACTIVE) + return bundle; + return null; + } + + private static Bundle basicGetPluginBundle(String pluginId) { + return Platform.getBundle(pluginId); + } + + private static boolean isInExceptionList(Bundle bundle, String className) { + String packageName = className.substring(0, className.lastIndexOf('.')); + Set exceptionSet = bundleToExceptionsSetMap.get(bundle); + if(exceptionSet == null) { + Dictionary dict = bundle.getHeaders(); + String value = dict.get("Eclipse-LazyStart"); //$NON-NLS-1$ + if(value != null) { + int index = value.indexOf("exceptions"); //$NON-NLS-1$ + if(index != -1) { + try { + int start = value.indexOf('"', index + 1); + int end = value.indexOf('"', start + 1); + String exceptions = value.substring(start + 1, end); + exceptionSet = new HashSet(2); + StringTokenizer tokenizer = new StringTokenizer(exceptions, ","); //$NON-NLS-1$ + while(tokenizer.hasMoreTokens()) { + exceptionSet.add(tokenizer.nextToken().trim()); + } + } catch (IndexOutOfBoundsException exception) { + // this means the MF did not follow the documented format for the exceptions list so i'll consider it empty + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + bundleToExceptionsSetMap.put(bundle, exceptionSet); + } + return exceptionSet.contains(packageName); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeFactory.java new file mode 100644 index 00000000000..8101df940bd --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/AspectSemanticTypeFactory.java @@ -0,0 +1,106 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.NullElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; + + +/** + * Factory to create Aspect Semantic Element Types from their {@link AspectSemanticTypeConfiguration} + */ +public class AspectSemanticTypeFactory extends AbstractConfigurableElementTypeFactory { + + /** + * Default Constructor + */ + public AspectSemanticTypeFactory() { + } + + /** + * {@inheritDoc} + */ + @Override + protected IEditHelperAdvice createEditHelperAdvice(AspectSemanticTypeConfiguration configuration) { + List semanticActionConfigurations = configuration.getActionConfiguration(); + List actionAdvices = new ArrayList(semanticActionConfigurations.size()); + for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) { + IEditHelperAdvice advice = AspectConfigurationFactoryRegistry.getInstance().createEditHelperAdvice(actionConfiguration); + if(advice!=null) { + actionAdvices.add(advice); +// } else { +// Activator.log.error("Impossible to create an advice for :" + actionConfiguration, null); + } + } + if(actionAdvices!=null && actionAdvices.size() > 0) { + return new ComposedEditHelperAdvice(actionAdvices); + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + protected IContainerDescriptor createContainerDescriptor(AspectSemanticTypeConfiguration configuration) { + List semanticActionConfigurations = configuration.getActionConfiguration(); + List containerDescriptors = new ArrayList(semanticActionConfigurations.size()); + for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) { + IContainerDescriptor containerDescriptor = AspectConfigurationFactoryRegistry.getInstance().createContainerDescriptor(actionConfiguration); + if(containerDescriptor!=null) { + containerDescriptors.add(containerDescriptor); +// } else { +// Activator.log.error("Impossible to create a container descriptor for :" + actionConfiguration, null); + } + } + if(containerDescriptors!=null && containerDescriptors.size() > 0) { + return new ComposedContainerDescriptor(containerDescriptors); + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public ICreationElementValidator createElementCreationValidator(AspectSemanticTypeConfiguration configuration) { + List semanticActionConfigurations = configuration.getActionConfiguration(); + List actionValidators = new ArrayList(semanticActionConfigurations.size()); + for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) { + ICreationElementValidator validator = AspectConfigurationFactoryRegistry.getInstance().createCreationElementValidator(actionConfiguration); + if(validator!=null) { + actionValidators.add(validator); +// } else { +// Activator.log.error("Impossible to create a creation element validator for :" + actionConfiguration, null); + } + } + if(actionValidators!=null && actionValidators.size() > 0) { + return new ComposedElementCreationValidator(actionValidators); + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + protected IElementMatcher createElementMatcher(AspectSemanticTypeConfiguration configuration) { + // these element types are there only for creation => it can not be match at any time + return new NullElementMatcher(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedContainerDescriptor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedContainerDescriptor.java new file mode 100644 index 00000000000..3c0094ffd2e --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedContainerDescriptor.java @@ -0,0 +1,95 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EReference; +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + +/** + * @author RS211865 + */ +public class ComposedContainerDescriptor implements IContainerDescriptor { + + private final List containerDescriptors; + + /** + * @param containerDescriptors + */ + public ComposedContainerDescriptor(List containerDescriptors) { + this.containerDescriptors = containerDescriptors; + } + + /** + * {@inheritDoc} + */ + public IElementMatcher getMatcher() { + List matchers = new ArrayList(); + // creates a composed matcher from all container descriptors + for(IContainerDescriptor containerDescriptor : getContainerDescriptors()) { + // each composed advice should approve the request + IElementMatcher composedMatcher = containerDescriptor.getMatcher(); + if(composedMatcher != null) { + matchers.add(composedMatcher); + } + } + if(matchers != null && !matchers.isEmpty()) { + return new ComposedElementMatcher(matchers); + } + return null; + } + + /** + * {@inheritDoc} + */ + public EReference[] getContainmentFeatures() { + // retrieve all references in the intersection of all composed container descriptors + List joinReferences = null; + // creates a composed matcher from all container descriptors + for(IContainerDescriptor containerDescriptor : getContainerDescriptors()) { + // each composed advice should approve the request + EReference[] eReferencesArray = containerDescriptor.getContainmentFeatures(); + if(eReferencesArray != null) { + List eReferences = Arrays.asList(eReferencesArray); + // if join references has not been set yet, set the list of possible containment features + // if not, make the intersection of both list + if(joinReferences ==null) { + joinReferences = eReferences; + } else { + List newReferences = new ArrayList(); + for(EReference eReference : joinReferences) { + if(eReferences.contains(eReference)) { + newReferences.add(eReference); + } + } + joinReferences = newReferences; + } + } + } + if(joinReferences != null) { + return joinReferences.toArray(new EReference[] {}); + } + return null; + } + + /** + * @return the containerDescriptors + */ + protected List getContainerDescriptors() { + return containerDescriptors; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedEditHelperAdvice.java new file mode 100644 index 00000000000..cc8921dd424 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedEditHelperAdvice.java @@ -0,0 +1,178 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.util.List; + +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; + +/** + * Generic class for Aspect Element types + */ +public class ComposedEditHelperAdvice extends AbstractEditHelperAdvice { + + /** + * List of composed advices + */ + private final List composedAdvices; + + /** + * Creates a composed edit helper advice from an ordered list of advices + */ + public ComposedEditHelperAdvice(List composedAdvices) { + this.composedAdvices = composedAdvices; + } + + /** + * Returns the list of composed advices for this edit helper advice. + * + * @return the list of composed advices + */ + protected List getComposedAdvices() { + return composedAdvices; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + for(IEditHelperAdvice advice : getComposedAdvices()) { + // each composed advice should approve the request + if(!advice.approveRequest(request)) { + return false; + } + } + return super.approveRequest(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + ICommand resultCommand = null; + for(IEditHelperAdvice advice : getComposedAdvices()) { + ICommand command = advice.getBeforeEditCommand(request); + if(command != null) { + if(resultCommand != null) { + resultCommand = resultCommand.compose(command); + } else { + resultCommand = command; + } + } + } + return resultCommand; + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterConfigureCommand(ConfigureRequest request) { + ICommand resultCommand = null; + for(IEditHelperAdvice advice : getComposedAdvices()) { + ICommand command = advice.getAfterEditCommand(request); + if(command != null) { + if(resultCommand != null) { + resultCommand = resultCommand.compose(command); + } else { + resultCommand = command; + } + } + } + return resultCommand; + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeCreateCommand(CreateElementRequest request) { + ICommand resultCommand = null; + for(IEditHelperAdvice advice : getComposedAdvices()) { + ICommand command = advice.getBeforeEditCommand(request); + if(command != null) { + if(resultCommand != null) { + resultCommand = resultCommand.compose(command); + } else { + resultCommand = command; + } + } + } + return resultCommand; + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterCreateCommand(CreateElementRequest request) { + ICommand resultCommand = null; + for(IEditHelperAdvice advice : getComposedAdvices()) { + ICommand command = advice.getAfterEditCommand(request); + if(command != null) { + if(resultCommand != null) { + resultCommand = resultCommand.compose(command); + } else { + resultCommand = command; + } + } + } + return resultCommand; + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request) { + ICommand resultCommand = null; + for(IEditHelperAdvice advice : getComposedAdvices()) { + ICommand command = advice.getBeforeEditCommand(request); + if(command != null) { + if(resultCommand != null) { + resultCommand = resultCommand.compose(command); + } else { + resultCommand = command; + } + } + } + return resultCommand; + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterCreateRelationshipCommand(CreateRelationshipRequest request) { + ICommand resultCommand = null; + for(IEditHelperAdvice advice : getComposedAdvices()) { + ICommand command = advice.getAfterEditCommand(request); + if(command != null) { + if(resultCommand != null) { + resultCommand = resultCommand.compose(command); + } else { + resultCommand = command; + } + } + } + return resultCommand; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementCreationValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementCreationValidator.java new file mode 100644 index 00000000000..cf2a7d191ae --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementCreationValidator.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; + + +/** + * {@link ICreationElementValidator} composed by several validators + */ +public class ComposedElementCreationValidator implements ICreationElementValidator { + + + private final List composedValidators; + + /** + * Default Constructor + * @param composedValidators the list of composed validators + */ + public ComposedElementCreationValidator(List composedValidators) { + this.composedValidators = composedValidators; + } + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + for(ICreationElementValidator validator : getComposedValidators()) { + if(!validator.canCreate(request)) { + return false; + } + } + // all validators were OK => element can be created + return true; + } + + /** + * Returns the list of composed validators + * @return the list of composed validators + */ + protected List getComposedValidators() { + return composedValidators; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementMatcher.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementMatcher.java new file mode 100644 index 00000000000..10f38a4ad00 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ComposedElementMatcher.java @@ -0,0 +1,50 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + + +/** + * @author RS211865 + */ +public class ComposedElementMatcher implements IElementMatcher { + + private final List matchers; + + public ComposedElementMatcher(List matchers) { + this.matchers = matchers; + } + + /** + * {@inheritDoc} + */ + public boolean matches(EObject eObject) { + for(IElementMatcher matcher : getMatchers()) { + if(!matcher.matches(eObject)) { + return false; + } + } + return true; + } + + /** + * @return the matchers + */ + protected List getMatchers() { + return matchers; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ConfigurableElementMatcherFactoryRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ConfigurableElementMatcherFactoryRegistry.java new file mode 100644 index 00000000000..533e7b86434 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ConfigurableElementMatcherFactoryRegistry.java @@ -0,0 +1,246 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Dictionary; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.osgi.framework.Bundle; + +/** + * Registry for all element matcher factories for element matcher based on {@link MatcherConfiguration}. + */ +public class ConfigurableElementMatcherFactoryRegistry { + + /** private singleton instance */ + private static ConfigurableElementMatcherFactoryRegistry registry; + + protected Map> configurationTypeToMatcherFactory = null; + + protected List configurationTypeFactoryExceptions = null; + + /** + * returns the singleton instance of this registry + * + * @return the singleton instance of this registry + */ + public static synchronized ConfigurableElementMatcherFactoryRegistry getInstance() { + if(registry == null) { + registry = new ConfigurableElementMatcherFactoryRegistry(); + registry.init(); + } + return registry; + } + + /** + * Inits the registry. + */ + protected void init() { + configurationTypeToMatcherFactory = new HashMap>(); + + } + + /** + * Creates the {@link IElementMatcher} specific to the given rule configuration + * + * @param ruleConfiguration + * the rule configuration that will configure the created matcher + * @return the {@link IElementMatcher} created or null if none could be created + */ + public IConfigurableElementMatcher createElementMatcher(MatcherConfiguration matcherConfiguration) { + String configurationType = matcherConfiguration.eClass().getInstanceTypeName(); + IConfigurableElementMatcherFactory factory = configurationTypeToMatcherFactory.get(configurationType); + // check factory is not on the exception table + if(factory == null && isNotInFactoryExceptionList(configurationType)) { + Class> factoryClass = retrieveFactoryClassFromExtensionPoint(configurationType); + if(factoryClass != null) { + try { + factory = factoryClass.newInstance(); + } catch (InstantiationException e) { + if(configurationTypeFactoryExceptions == null) { + configurationTypeFactoryExceptions = new ArrayList(); + } + configurationTypeFactoryExceptions.add(configurationType); + } catch (IllegalAccessException e) { + if(configurationTypeFactoryExceptions == null) { + configurationTypeFactoryExceptions = new ArrayList(); + } + configurationTypeFactoryExceptions.add(configurationType); + } + configurationTypeToMatcherFactory.put(configurationType, factory); + } + } + if(factory != null) { + IConfigurableElementMatcher elementMatcher = factory.createElementMatcher(matcherConfiguration); + if(elementMatcher !=null) { + //elementMatcher.init(matcherConfiguration); + return elementMatcher; + } + } + return null; + } + + /** + * check this configuration type has not already caused issues du + * + * @param configurationType + * @return + */ + protected boolean isNotInFactoryExceptionList(String configurationType) { + if(configurationTypeFactoryExceptions == null) { + return true; + } + // this is not null, check the configuration type is not in the list + return !configurationTypeFactoryExceptions.contains(configurationType); + } + + /** + * Returns the {@link IExtendedElementTypeFactory} class used to instantiate element type for the given configuration + * + * @return the {@link IExtendedElementTypeFactory} found or null if none was found + */ + @SuppressWarnings("unchecked") + protected Class> retrieveFactoryClassFromExtensionPoint(String configurationType) { + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IElementMatcherExtensionPoint.EXTENSION_POINT_ID); + for(IConfigurationElement configurationElement : elements) { + String eCoreClassName = configurationElement.getAttribute(IElementMatcherExtensionPoint.MATCHER_CONFIGURATION_CLASS); + if(configurationType.equals(eCoreClassName)) { + // retrieve factory to load + String factoryClassName = configurationElement.getAttribute(IElementMatcherExtensionPoint.MATCHER_FACTORY_CLASS); + return (Class>)loadClass(factoryClassName, configurationElement.getContributor().getName()); + } + } + return null; + } + + /////////////////////////////////////////////////////////////////////////// + // loading resource + /////////////////////////////////////////////////////////////////////////// + /** A map of classes that have been successfully loaded, keyed on the class name optionally prepended by the plugin ID, if specified. */ + private static Map>> successLookupTable = new HashMap>>(); + + /** A map of classes that could not be loaded, keyed on the class name, optionally prepended by the plugin ID if specified. */ + private static Set failureLookupTable = new HashSet(); + + /** A map to hold the bundle to exception list */ + private static Map> bundleToExceptionsSetMap = new HashMap>(); + + /** + * A utility method to load a class using its name and a given class loader. + * + * @param className + * The class name + * @param bundle + * The class loader + * @return The loaded class or null if could not be loaded + */ + protected static Class loadClass(String className, String pluginId) { + StringBuffer keyStringBuf = new StringBuffer(className.length() + pluginId.length() + 2); // 2 is for . and extra. + keyStringBuf.append(pluginId); + keyStringBuf.append('.'); + keyStringBuf.append(className); + String keyString = keyStringBuf.toString(); + WeakReference> ref = successLookupTable.get(keyString); + Class found = (ref != null) ? ref.get() : null; + if(found == null) { + if(ref != null) + successLookupTable.remove(keyString); + if(!failureLookupTable.contains(keyString)) { + try { + Bundle bundle = basicGetPluginBundle(pluginId); + if(bundle != null) { + // never load the class if the bundle is not active other wise + // we will cause the plugin to load + // unless the class is in the exception list + int state = bundle.getState(); + if(state == org.osgi.framework.Bundle.ACTIVE || isInExceptionList(bundle, className)) { + found = bundle.loadClass(className); + successLookupTable.put(keyString, new WeakReference>(found)); + if(state == org.osgi.framework.Bundle.ACTIVE) { + bundleToExceptionsSetMap.remove(bundle); + } + } + } else { + failureLookupTable.add(keyString); + } + } catch (ClassNotFoundException e) { + failureLookupTable.add(keyString); + } + } + } + return found; + } + + /** + * Given a bundle id, it checks if the bundle is found and activated. If it + * is, the method returns the bundle, otherwise it returns null. + * + * @param pluginId + * the bundle ID + * @return the bundle, if found + */ + protected static Bundle getPluginBundle(String pluginId) { + Bundle bundle = basicGetPluginBundle(pluginId); + if(null != bundle && bundle.getState() == org.osgi.framework.Bundle.ACTIVE) + return bundle; + return null; + } + + private static Bundle basicGetPluginBundle(String pluginId) { + return Platform.getBundle(pluginId); + } + + private static boolean isInExceptionList(Bundle bundle, String className) { + String packageName = className.substring(0, className.lastIndexOf('.')); + Set exceptionSet = bundleToExceptionsSetMap.get(bundle); + if(exceptionSet == null) { + Dictionary dict = bundle.getHeaders(); + String value = dict.get("Eclipse-LazyStart"); //$NON-NLS-1$ + if(value != null) { + int index = value.indexOf("exceptions"); //$NON-NLS-1$ + if(index != -1) { + try { + int start = value.indexOf('"', index + 1); + int end = value.indexOf('"', start + 1); + String exceptions = value.substring(start + 1, end); + exceptionSet = new HashSet(2); + StringTokenizer tokenizer = new StringTokenizer(exceptions, ","); //$NON-NLS-1$ + while(tokenizer.hasMoreTokens()) { + exceptionSet.add(tokenizer.nextToken().trim()); + } + } catch (IndexOutOfBoundsException exception) { + // this means the MF did not follow the documented format for the exceptions list so i'll consider it empty + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + bundleToExceptionsSetMap.put(bundle, exceptionSet); + } + return exceptionSet.contains(packageName); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java new file mode 100644 index 00000000000..1160cf3be76 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java @@ -0,0 +1,122 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.lang.reflect.Field; + +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.SpecializationTypeDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.internal.impl.SpecializationTypeRegistry; + + +/** + * Utility class to manipulate {@link ExtendedElementTypeSet}. + */ +public class ElementTypeSetUtils { + + /** + * Loads + * @param extendedElementTypeSet + */ + public static void load(ExtendedElementTypeSet extendedElementTypeSet) { + + } + + +// public static void unload(String identifier) { +// // retrieve the extended type set with given identifier and unloads it +// ExtendedElementTypeSet set = ExtendedElementTypeSetRegistry.getInstance().getExtendedTypeSets().get(identifier); +// if(set!=null) { +// unload(set); +// } +// } + +// /** +// * Unloads a given {@link ExtendedElementTypeSet} +// * @param elementTypeSet the element type set to unload +// */ +// public static void unload(ExtendedElementTypeSet elementTypeSet) { +// // retrieve the specializationTypeRegistry to remove all contribution from the given element type set +// Field declaredField = null; +// try { +// declaredField = ElementTypeRegistry.class.getDeclaredField("specializationTypeRegistry"); +// } catch (SecurityException e1) { +// Activator.log.error(e1); +// return; +// } catch (NoSuchFieldException e1) { +// Activator.log.error(e1); +// return; +// } +// if(declaredField==null) { +// Activator.log.error("impossible to find specializationTypeRegistry", null); +// return; +// } +// declaredField.setAccessible(true); +// SpecializationTypeRegistry registry = null; +// try { +// registry = (SpecializationTypeRegistry)declaredField.get(ElementTypeRegistry.getInstance()); +// } catch (IllegalArgumentException e) { +// Activator.log.error(e); +// } catch (IllegalAccessException e) { +// Activator.log.error(e); +// } +// +// if(registry == null) { +// return; +// } +// +// for(ElementTypeConfiguration configuration : elementTypeSet.getElementType()) { +// if(configuration!=null && configuration.getIdentifier()!=null) { +// String identifier = configuration.getIdentifier(); +// // retrieve descriptor +// SpecializationTypeDescriptor descriptor = registry.getSpecializationTypeDescriptor(identifier); +// if(descriptor!=null) { +// registry.removeSpecializationType(descriptor); +// } +// } +// } +// +// elementTypeSet.eResource().unload(); +// elementTypeSet.eResource().getResourceSet().getResources().remove(elementTypeSet.eResource()); +// } + +// public static void resetRegistry() { +// // FIXME save the current listeners, to add them back to the registry +// IClientContext context; +// try { +// context = TypeContext.getContext(); +// } catch (ServiceException e1) { +// Activator.log.error(e1); +// return; +// } +// // impossibe to unregister element types... +// // => destroy the singleton instance of the registry... +// try { +// Field declaredField = ElementTypeRegistry.class.getDeclaredField("INSTANCE"); +// declaredField.setAccessible(true); +// declaredField.set(null, null); +// } catch (SecurityException e1) { +// e1.printStackTrace(); +// } catch (NoSuchFieldException e1) { +// e1.printStackTrace(); +// } catch (IllegalArgumentException e) { +// e.printStackTrace(); +// } catch (IllegalAccessException e) { +// e.printStackTrace(); +// } +// +// // create the registry +// ElementTypeRegistry.getInstance(); +// } + +} \ No newline at end of file diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java deleted file mode 100644 index c9d4e184520..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdvice.java +++ /dev/null @@ -1,107 +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.infra.extendedtypes; - -import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; -import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; -import org.eclipse.papyrus.infra.extendedtypes.providers.ExtendedElementTypeActionService; -import org.eclipse.papyrus.infra.extendedtypes.providers.ProviderNotFoundException; -import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; - -/** - * Edit helper Advice for extended element types. This allows modification of the configure request executed right after the creation of the element - */ -public class ExtendedEditHelperAdvice extends AbstractEditHelperAdvice { - - /** - * Constructor. - * - */ - public ExtendedEditHelperAdvice() { - } - - /** - * {@inheritDoc} - */ - @Override - public boolean approveRequest(IEditCommandRequest request) { - return super.approveRequest(request); - } - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getBeforeEditContextCommand(GetEditContextRequest request) { - return super.getBeforeEditContextCommand(request); - } - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getBeforeCreateCommand(CreateElementRequest request) { - return super.getBeforeCreateCommand(request); - } - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getAfterConfigureCommand(ConfigureRequest request) { - // for the list of post actions, returns a list of commands. - // there should be a factory that delivers commands from the model - - CompositeCommand compositeCommand = new CompositeCommand("AfterConfigureCommand"); - IElementType type = request.getTypeToConfigure(); - if(type instanceof IExtendedHintedElementType) { - IExtendedHintedElementType extendedHintedElementType = (IExtendedHintedElementType)type; - ExtendedElementTypeConfiguration configuration = extendedHintedElementType.getConfiguration(); - for(PostActionConfiguration postActionConfiguration : configuration.getPostAction()) { - ICommand command = null; - try { - command = ExtendedElementTypeActionService.getInstance().getICommand(request.getElementsToEdit(), postActionConfiguration); - } catch (ProviderNotFoundException e) { - Activator.log.error(e); - } - if(command != null) { - compositeCommand.add(command); - } - } - - // return the composite command only if it is not empty - if(!compositeCommand.isEmpty()) { - return compositeCommand; - } - } - - - // post-action. Here, this is null. - return super.getAfterConfigureCommand(request); - } - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getAfterCreateCommand(CreateElementRequest request) { - return super.getAfterCreateCommand(request); - } - - -} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java new file mode 100644 index 00000000000..53526b072e0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java @@ -0,0 +1,627 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import java.io.IOException; +import java.lang.ref.WeakReference; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Dictionary; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.StringTokenizer; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IClientContext; +import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.SpecializationTypeDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.internal.impl.SpecializationTypeRegistry; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; +import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext; +import org.osgi.framework.Bundle; + +/** + * Registry to manage load/unloaded {@link ExtendedElementTypeSet}. + */ +public class ExtendedElementTypeSetRegistry { + + public static final String LOCAL_CONTRIBUTOR_ID = "local contribution"; + + /** private singleton instance */ + private static ExtendedElementTypeSetRegistry registry; + + /** Map of retrieved extended type sets, key is their identifier */ + protected Map extendedTypeSets = null; + + /** unique resource set to load all extended types models */ + protected ResourceSet extendedTypesResourceSet = null; + + protected List loadedExtendedElementTypeSets = null; + + protected Map> configurationTypeToElementTypeFactory = null; + + protected List configurationTypeFactoryExceptions = null; + + /** + * returns the singleton instance of this registry + * + * @return the singleton instance of this registry + */ + public static synchronized ExtendedElementTypeSetRegistry getInstance() { + if(registry == null) { + registry = new ExtendedElementTypeSetRegistry(); + registry.init(); + } + return registry; + } + + /** + * Inits the registry. + */ + protected void init() { + // 0. Resets values + extendedTypesResourceSet = null; + extendedTypeSets = null; + configurationTypeToElementTypeFactory = new HashMap>(); + // 1. creates the resource set + extendedTypesResourceSet = createResourceSet(); + // 2. creates the list only when registry is acceded for the first time, (or on reload?) + extendedTypeSets = loadExtendedTypeSets(); + } + + /** + * Dispose this registry, i.e. remove all contribution on the element type registry + */ + public void dispose() { + if(extendedTypeSets == null){ + return; + } + for(Entry entry: extendedTypeSets.entrySet()) { + unload(entry.getKey()); + } + extendedTypesResourceSet = null; + extendedTypeSets = null; + configurationTypeToElementTypeFactory = new HashMap>(); + // 1. creates the resource set + extendedTypesResourceSet = null; + registry = null; + } + + + /** + * Loads a given extended type set from a given identifier + */ + public void loadExtendedElementTypeSet(String identifier) { + if(getExtendedTypeSets()==null) { + return; + } + + // retrieve the path from the identifier + String path = ExtendedTypesPreferences.getLocalExtendedTypesDefinitions().get(identifier); + if(path==null) { + return; + } + + URI localURI = URI.createPlatformResourceURI(path, true); + Resource resource = extendedTypesResourceSet.createResource(localURI); + try { + resource.load(null); + EObject content = resource.getContents().get(0); + if(content instanceof ExtendedElementTypeSet) { + getExtendedTypeSets().put(identifier, (ExtendedElementTypeSet)content); + loadExtendedElementTypeSet((ExtendedElementTypeSet)content); + } + } catch (IOException e) { + Activator.log.error(e); + } + } + + /** + * Loads the specified extended element type set. + * This does not take care to unload a similar set (a set with the same id) before loading. This should be handled before calling this method. + * + * @param extendedElementTypeSet + * {@link ExtendedElementTypeSet} to load. + */ + public void loadExtendedElementTypeSet(ExtendedElementTypeSet extendedElementTypeSet) { + IClientContext context; + try { + context = TypeContext.getContext(); + } catch (ServiceException e1) { + Activator.log.error(e1); + return; + } + List elementTypeConfigurations = extendedElementTypeSet.getElementType(); + for(ElementTypeConfiguration configuration : elementTypeConfigurations) { + // load class associated to the configuration model => read extension point that defines this kind of configuration. + String configurationType = configuration.eClass().getInstanceTypeName(); + // retrieve the factory for a given kind of configuration + IExtendedElementTypeFactory factory = configurationTypeToElementTypeFactory.get(configurationType); + // check factory is not on the exception table + if(factory == null && isNotInFactoryExceptionList(configurationType)) { + Class> factoryClass = retrieveFactoryClassFromExtensionPoint(configurationType); + if(factoryClass != null) { + try { + factory = factoryClass.newInstance(); + } catch (InstantiationException e) { + if(configurationTypeFactoryExceptions == null) { + configurationTypeFactoryExceptions = new ArrayList(); + } + configurationTypeFactoryExceptions.add(configurationType); + } catch (IllegalAccessException e) { + if(configurationTypeFactoryExceptions == null) { + configurationTypeFactoryExceptions = new ArrayList(); + } + configurationTypeFactoryExceptions.add(configurationType); + } + configurationTypeToElementTypeFactory.put(configurationType, factory); + } + } + if(factory != null) { + IExtendedHintedElementType type = factory.createElementType(configuration); + // register element Type + ElementTypeRegistry.getInstance().register(type); + context.bindId(type.getId()); + } + } + } + + /** + * Unloads a given {@link ExtendedElementTypeSet} + * @param elementTypeSet the element type set to unload + */ + public void unload(String identifier) { + if(extendedTypeSets==null) { + return; + } + ExtendedElementTypeSet elementTypeSet = extendedTypeSets.get(identifier); + if(elementTypeSet==null) { + return; + } + + // retrieve the specializationTypeRegistry to remove all contribution from the given element type set + Field declaredField = null; + try { + declaredField = ElementTypeRegistry.class.getDeclaredField("specializationTypeRegistry"); + } catch (SecurityException e1) { + Activator.log.error(e1); + return; + } catch (NoSuchFieldException e1) { + Activator.log.error(e1); + return; + } + if(declaredField==null) { + Activator.log.error("impossible to find specializationTypeRegistry", null); + return; + } + declaredField.setAccessible(true); + SpecializationTypeRegistry registry = null; + try { + registry = (SpecializationTypeRegistry)declaredField.get(ElementTypeRegistry.getInstance()); + } catch (IllegalArgumentException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + + if(registry == null) { + return; + } + + for(ElementTypeConfiguration configuration : elementTypeSet.getElementType()) { + if(configuration!=null && configuration.getIdentifier()!=null) { + String configIdentifier = configuration.getIdentifier(); + // retrieve descriptor + SpecializationTypeDescriptor descriptor = registry.getSpecializationTypeDescriptor(configIdentifier); + if(descriptor!=null) { + // remove also advice bindings specific to this descriptor + IEditHelperAdviceDescriptor adviceDescriptor = descriptor.getEditHelperAdviceDescriptor(); + String targetId = adviceDescriptor.getTypeId(); + removeAdviceFromBindings(registry, targetId, adviceDescriptor); + + registry.removeSpecializationType(descriptor); + + } + } + } + + elementTypeSet.eResource().unload(); + if(extendedTypesResourceSet!=null) { + extendedTypesResourceSet.getResources().remove(elementTypeSet.eResource()); + } + } + + protected void removeAdviceFromBindings(SpecializationTypeRegistry registry, String adviceDescriptorId, IEditHelperAdviceDescriptor adviceDescriptor) { + // retrieve the specializationTypeRegistry to remove all contribution from the given element type set + Map adviceBindings = null; + Field adviceBindingsField = null; + try { + adviceBindingsField = SpecializationTypeRegistry.class.getDeclaredField("adviceBindings"); + } catch (SecurityException e1) { + Activator.log.error(e1); + return; + } catch (NoSuchFieldException e1) { + Activator.log.error(e1); + return; + } + if(adviceBindingsField==null) { + Activator.log.error("impossible to find adviceBindings", null); + return; + } + adviceBindingsField.setAccessible(true); + try { + adviceBindings = (Map)adviceBindingsField.get(registry); + } catch (IllegalArgumentException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + if(adviceBindings!=null) { + Set bindings = (Set)adviceBindings.get(adviceDescriptorId); + if(bindings!=null) { + bindings.remove(adviceDescriptor); + } + } + } + + + + + /** + * check this configuration type has not already caused issues du + * + * @param configurationType + * @return + */ + protected boolean isNotInFactoryExceptionList(String configurationType) { + if(configurationTypeFactoryExceptions == null) { + return true; + } + // this is not null, check the configuration type is not in the list + return !configurationTypeFactoryExceptions.contains(configurationType); + } + + /** + * Returns the {@link IExtendedElementTypeFactory} class used to instantiate element type for the given configuration + * + * @return the {@link IExtendedElementTypeFactory} found or null if none was found + */ + @SuppressWarnings("unchecked") + protected Class> retrieveFactoryClassFromExtensionPoint(String configurationType) { + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IExtendedTypeConfigurationExtensionPoint.EXTENSION_POINT_ID); + for(IConfigurationElement configurationElement : elements) { + String eCoreClassName = configurationElement.getAttribute(IExtendedTypeConfigurationExtensionPoint.CONFIGURATION_CLASS); + if(configurationType.equals(eCoreClassName)) { + // retrieve factory to load + String factoryClassName = configurationElement.getAttribute(IExtendedTypeConfigurationExtensionPoint.FACTORY_CLASS); + return (Class>)loadClass(factoryClassName, configurationElement.getContributor().getName()); + } + } + return null; + } + + /** + * Retrieves and loads extended type sets registered in the platform. It should also load configuration sets from the workspace. + */ + protected Map loadExtendedTypeSets() { + Map extendedElementTypeSets = new HashMap(); + // 1. retrieve from the workspace + Map localSets = loadExtendedTypeSetsFromWorkspace(); + if(localSets != null && !localSets.isEmpty()) { + extendedElementTypeSets.putAll(localSets); + } + + // 2. retrieve from the platform. If already in workspace (id), do not load the platform ones + Map registeredSets = loadExtendedTypeSetsFromPlatform(localSets.keySet()); + if(registeredSets != null && !registeredSets.isEmpty()) { + extendedElementTypeSets.putAll(registeredSets); + } + // load each extended element type set + for(Entry entry : extendedElementTypeSets.entrySet()) { + loadExtendedElementTypeSet(entry.getValue()); + } + return extendedElementTypeSets; + } + + /** + * @return + */ + protected Map loadExtendedTypeSetsFromWorkspace() { + Map localFilesPath = ExtendedTypesPreferences.getLocalExtendedTypesDefinitions(); + Map workspaceElementTypeSets = new HashMap(); + if(localFilesPath != null && !localFilesPath.isEmpty()) { + for(Entry idToPath : localFilesPath.entrySet()) { + String filePath = idToPath.getValue(); + String id = idToPath.getKey(); + + URI localURI = URI.createPlatformResourceURI(filePath, true); + Resource resource = extendedTypesResourceSet.createResource(localURI); + try { + resource.load(null); + EObject content = resource.getContents().get(0); + if(content instanceof ExtendedElementTypeSet) { + workspaceElementTypeSets.put(id, (ExtendedElementTypeSet)content); + } + } catch (IOException e) { + Activator.log.error(e); + } + } + } + return workspaceElementTypeSets; + } + + /** + * Loads the extensions in the platform + * + * @return the list of extension registered in the platform + */ + protected Map loadExtendedTypeSetsFromPlatform(Set workspaceDefinitions) { + Map platformElementTypeSets = new HashMap(); + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IExtendedElementTypeSetExtensionPoint.EXTENSION_POINT_ID); + // for each element, parses and retrieve the model file. then loads it and returns the root element + for(IConfigurationElement element : elements) { + String modelPath = element.getAttribute(IExtendedElementTypeSetExtensionPoint.PATH); + String extendedTypeSetId = element.getAttribute(IExtendedElementTypeSetExtensionPoint.ID); + String contributorID = element.getContributor().getName(); + if(Platform.inDebugMode()) { + Activator.log.debug("[Reading extension point]"); + Activator.log.debug("- Path to the model: " + modelPath); + Activator.log.debug("- id of the container bundle: " + contributorID); + Activator.log.debug("- id of the extended type set: " + extendedTypeSetId); + } + ExtendedElementTypeSet set = getExtendedElementTypeSet(extendedTypeSetId, modelPath, contributorID); + if(set != null && !workspaceDefinitions.contains(extendedTypeSetId)) { // do not add if it is locally redefined + platformElementTypeSets.put(extendedTypeSetId, set); + } + } + return platformElementTypeSets; + } + + /** + *

    + * Loads the resource containing the extended element type set model. + *

    + *

    + * It looks the model file in the fragments first, then in the plugin itself.
    + * If this is already a fragment, it should look in the fragment only + *

    + * + * @param extendedTypesID + * id of the extended type set to load + * @param modelPath + * path of the model in the bundle + * @param bundleId + * id of the bundle containing the model file + * @return the loaded file or null if some problem occured during loading + */ + protected ExtendedElementTypeSet getExtendedElementTypeSet(String extendedTypesID, String modelPath, String bundleId) { + // 1. look in preferences. + String filePath = ExtendedTypesPreferences.getExtendedTypesRedefinition(extendedTypesID); + if(filePath != null) { + getExtendedElementTypeSetInPluginStateArea(extendedTypesID); + } + // 2. no local redefinition. Load extended type set from plugin definition + Bundle bundle = Platform.getBundle(bundleId); + if(Platform.isFragment(bundle)) { + return getExtendedElementTypeSetInBundle(modelPath, bundleId); + } else { // this is a plugin. Search in sub fragments, then in the plugin + Bundle[] fragments = Platform.getFragments(bundle); + // no fragment, so the file should be in the plugin itself + if(fragments == null) { + return getExtendedElementTypeSetInBundle(modelPath, bundleId); + } else { + for(Bundle fragment : fragments) { + ExtendedElementTypeSet extendedElementTypeSet = getExtendedElementTypeSetInBundle(modelPath, fragment.getSymbolicName()); + if(extendedElementTypeSet != null) { + return extendedElementTypeSet; + } + } + // not found in fragments. Look in the plugin itself + return getExtendedElementTypeSetInBundle(modelPath, bundleId); + } + } + } + + /** + * Retrieves the contribution in the plugin area + * + * @param path + * the path of the element type set to load in the plugin area + */ + protected ExtendedElementTypeSet getExtendedElementTypeSetInPluginStateArea(String path) { + // read in preferences area + IPath resourcePath = Activator.getDefault().getStateLocation().append(path); + URI uri = URI.createFileURI(resourcePath.toOSString()); + if(uri != null && uri.isFile()) { + Resource resource = extendedTypesResourceSet.createResource(uri); + try { + resource.load(null); + } catch (IOException e) { + return null; + } + EObject content = resource.getContents().get(0); + if(content instanceof ExtendedElementTypeSet) { + return (ExtendedElementTypeSet)content; + } + Activator.log.error("Impossible to cast the object into an ExtendedElementTypeSet: " + content, null); + return null; + } + return null; + } + + /** + * + * @param modelPath + * path of the model in the bundle + * @param bundleId + * id of the bundle containing the model file + * @return the loaded file or null if some problem occured during loading + */ + protected ExtendedElementTypeSet getExtendedElementTypeSetInBundle(String modelPath, String bundleID) { + Resource resource = extendedTypesResourceSet.createResource(URI.createPlatformPluginURI(bundleID + Path.SEPARATOR + modelPath, true)); + try { + resource.load(null); + } catch (IOException e) { + return null; + } + EObject content = resource.getContents().get(0); + if(content instanceof ExtendedElementTypeSet) { + return (ExtendedElementTypeSet)content; + } + Activator.log.error("Impossible to cast the object into an ExtendedElementTypeSet: " + content, null); + return null; + } + + /** + * Creates the resource set that contains all models for extended types + * + * @return the resource set newly created. + */ + protected ResourceSet createResourceSet() { + ResourceSet set = new ResourceSetImpl(); + return set; + } + + /////////////////////////////////////////////////////////////////////////// + // loading resource + /////////////////////////////////////////////////////////////////////////// + /** A map of classes that have been successfully loaded, keyed on the class name optionally prepended by the plugin ID, if specified. */ + private static Map>> successLookupTable = new HashMap>>(); + + /** A map of classes that could not be loaded, keyed on the class name, optionally prepended by the plugin ID if specified. */ + private static Set failureLookupTable = new HashSet(); + + /** A map to hold the bundle to exception list */ + private static Map> bundleToExceptionsSetMap = new HashMap>(); + + /** + * A utility method to load a class using its name and a given class loader. + * + * @param className + * The class name + * @param bundle + * The class loader + * @return The loaded class or null if could not be loaded + */ + protected static Class loadClass(String className, String pluginId) { + StringBuffer keyStringBuf = new StringBuffer(className.length() + pluginId.length() + 2); // 2 is for . and extra. + keyStringBuf.append(pluginId); + keyStringBuf.append('.'); + keyStringBuf.append(className); + String keyString = keyStringBuf.toString(); + WeakReference> ref = successLookupTable.get(keyString); + Class found = (ref != null) ? ref.get() : null; + if(found == null) { + if(ref != null) + successLookupTable.remove(keyString); + if(!failureLookupTable.contains(keyString)) { + try { + Bundle bundle = basicGetPluginBundle(pluginId); + if(bundle != null) { + // never load the class if the bundle is not active other wise + // we will cause the plugin to load + // unless the class is in the exception list + int state = bundle.getState(); + if(state == org.osgi.framework.Bundle.ACTIVE || isInExceptionList(bundle, className)) { + found = bundle.loadClass(className); + successLookupTable.put(keyString, new WeakReference>(found)); + if(state == org.osgi.framework.Bundle.ACTIVE) { + bundleToExceptionsSetMap.remove(bundle); + } + } + } else { + failureLookupTable.add(keyString); + } + } catch (ClassNotFoundException e) { + failureLookupTable.add(keyString); + } + } + } + return found; + } + + /** + * Given a bundle id, it checks if the bundle is found and activated. If it + * is, the method returns the bundle, otherwise it returns null. + * + * @param pluginId + * the bundle ID + * @return the bundle, if found + */ + protected static Bundle getPluginBundle(String pluginId) { + Bundle bundle = basicGetPluginBundle(pluginId); + if(null != bundle && bundle.getState() == org.osgi.framework.Bundle.ACTIVE) + return bundle; + return null; + } + + private static Bundle basicGetPluginBundle(String pluginId) { + return Platform.getBundle(pluginId); + } + + private static boolean isInExceptionList(Bundle bundle, String className) { + String packageName = className.substring(0, className.lastIndexOf('.')); + Set exceptionSet = bundleToExceptionsSetMap.get(bundle); + if(exceptionSet == null) { + Dictionary dict = bundle.getHeaders(); + String value = dict.get("Eclipse-LazyStart"); //$NON-NLS-1$ + if(value != null) { + int index = value.indexOf("exceptions"); //$NON-NLS-1$ + if(index != -1) { + try { + int start = value.indexOf('"', index + 1); + int end = value.indexOf('"', start + 1); + String exceptions = value.substring(start + 1, end); + exceptionSet = new HashSet(2); + StringTokenizer tokenizer = new StringTokenizer(exceptions, ","); //$NON-NLS-1$ + while(tokenizer.hasMoreTokens()) { + exceptionSet.add(tokenizer.nextToken().trim()); + } + } catch (IndexOutOfBoundsException exception) { + // this means the MF did not follow the documented format for the exceptions list so i'll consider it empty + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + bundleToExceptionsSetMap.put(bundle, exceptionSet); + } + return exceptionSet.contains(packageName); + } + + /** + * @return the extendedTypeSets + */ + public Map getExtendedTypeSets() { + return extendedTypeSets; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedSemanticTypeDescriptor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedSemanticTypeDescriptor.java deleted file mode 100644 index 4d16f095f47..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedSemanticTypeDescriptor.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.eclipse.papyrus.infra.extendedtypes; - -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; -import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; -import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.ISpecializationTypeDescriptor; -import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; -import org.eclipse.papyrus.infra.extendedtypes.types.ExtendedHintedTypeFactory; -import org.osgi.framework.Bundle; - - -/** - * new descriptor implementation for on-the-fly added descriptor - */ -public class ExtendedSemanticTypeDescriptor implements ISpecializationTypeDescriptor { - - /** constant for specific semantic hint */ - public static final String EXTENDED_ELEMENTS = "ExtendedElements"; - - /** configuration of this descriptor */ - private final ExtendedElementTypeConfiguration configuration; - - /** cache of the specialized types */ - private List specializedTypes = null; - - /** - * Constructor. - * - * @param configuration - * the configuration of this descriptor - */ - public ExtendedSemanticTypeDescriptor(ExtendedElementTypeConfiguration configuration) { - this.configuration = configuration; - } - - /** - * Returns the configuration of the element type - * - * @return the configuration of the element type - */ - public ExtendedElementTypeConfiguration getConfiguration() { - return configuration; - } - - /** - * {@inheritDoc} - */ - public String getId() { - return configuration.getId(); - } - - /** - * {@inheritDoc} - */ - public URL getIconURL() { - IconEntry entry = configuration.getIconEntry(); - Bundle bundle = Platform.getBundle(entry.getBundleId()); - if(bundle == null) { - return null; - } - URL result = bundle.getEntry(entry.getIconPath()); - return result; - } - - /** - * {@inheritDoc} - */ - public String getName() { - return configuration.getName(); - } - - /** - * {@inheritDoc} - */ - public String getKindName() { - return configuration.getKindName(); - } - - /** - * {@inheritDoc} - */ - public String getParamValue(String paramName) { - if(ExtendedHintedTypeFactory.SEMANTIC_HINT_PARAM_NAME.equals(paramName)) { - return configuration.getHint(); - } - return EXTENDED_ELEMENTS; - } - - /** - * {@inheritDoc} - */ - public IContainerDescriptor getContainerDescriptor() { - return null; - } - - /** - * {@inheritDoc} - */ - public IElementType[] getSpecializedTypes() { - if(specializedTypes == null) { - specializedTypes = new ArrayList(); - for(String specializedTypeId : configuration.getSpecializedTypesID()) { - IElementType type = ElementTypeRegistry.getInstance().getType(specializedTypeId); - if(type != null) { - specializedTypes.add(type); - } else { - Activator.log.error("Impossible to find the type " + specializedTypeId, null); - } - } - } - return specializedTypes.toArray(new IElementType[specializedTypes.size()]); - } - - /** - * {@inheritDoc} - */ - public IElementMatcher getMatcher() { - return null; - } - - /** - * {@inheritDoc} - */ - public IEditHelperAdvice getEditHelperAdvice() { - return new ExtendedEditHelperAdvice(); - } - -} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java new file mode 100644 index 00000000000..6a25cdf0536 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java @@ -0,0 +1,52 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.papyrus.infra.core.services.IService; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.core.services.ServicesRegistry; + + +/** + * Service to register extended element types + */ +public class ExtendedTypeRegistryService implements IService { + + /** + * {@inheritDoc} + */ + public void init(ServicesRegistry servicesRegistry) throws ServiceException { + + } + + /** + * {@inheritDoc} + */ + public void startService() throws ServiceException { + // register elements in element type registry + ExtendedElementTypeSetRegistry.getInstance(); + } + + /** + * {@inheritDoc} + */ + public void disposeService() throws ServiceException { + // extended element type set registry should unregister all added element types in the gmf registry + ExtendedElementTypeSetRegistry.getInstance().dispose(); + } + + public ExtendedElementTypeSetRegistry getExtendedElementTypeSetRegistry() { + return ExtendedElementTypeSetRegistry.getInstance(); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistry.java deleted file mode 100644 index badcf2acb99..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistry.java +++ /dev/null @@ -1,276 +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.infra.extendedtypes; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.gmf.runtime.emf.type.core.ClientContextManager; -import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; -import org.eclipse.gmf.runtime.emf.type.core.IClientContext; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; -import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences; -import org.eclipse.papyrus.infra.extendedtypes.types.ExtendedHintedTypeFactory; -import org.osgi.framework.Bundle; - - -/** - * Registry for all extended types. - */ -public class ExtendedTypesRegistry { - - /** private singleton instance */ - private static ExtendedTypesRegistry registry; - - /** list of retrieved extended type sets */ - protected List extendedTypeSets = null; - - /** unique resource set to load all extended types models */ - protected ResourceSet extendedTypesResourceSet = null; - - /** - * Private constructor. - */ - private ExtendedTypesRegistry() { - - } - - /** - * returns the singleton instance of this registry - * - * @return the singleton instance of this registry - */ - public static synchronized ExtendedTypesRegistry getInstance() { - if(registry == null) { - registry = new ExtendedTypesRegistry(); - registry.init(); - } - return registry; - } - - /** - * Inits the registry. - */ - protected void init() { - // 0. Reset the values - extendedTypesResourceSet = null; - extendedTypeSets = null; - - // 1. create the resource set - extendedTypesResourceSet = createResourceSet(); - // 2. create the list only when registry is acceded for the first time - extendedTypeSets = loadExtendedTypeSets(); - } - - /** - * Retrieves and loads extended type sets registered in the platform. It should also load configuration sets from the workspace. - */ - protected List loadExtendedTypeSets() { - List extendedElementTypeSets = new ArrayList(); - - // 1. retrieve from the workspace - // TODO implement retrieve from workspace - - // 2. retrieve from the platform. - List registeredSets = loadExtendedTypeSetsFromPlatform(); - if(registeredSets != null && !registeredSets.isEmpty()) { - extendedElementTypeSets.addAll(registeredSets); - } - - return extendedElementTypeSets; - } - - /** - * Creates the resource set that contains all models for extended types - * - * @return the resource set newly created. - */ - protected ResourceSet createResourceSet() { - ResourceSet set = new ResourceSetImpl(); - return set; - } - - /** - * Loads the extensions in the platform - * - * @return the list of extension registered in the platform - */ - protected List loadExtendedTypeSetsFromPlatform() { - List platformElementTypeSets = new ArrayList(); - - IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IExtendedTypeExtensionPoint.EXTENSION_POINT_ID); - // for each element, parses and retrieve the model file. then loads it and returns the root element - for(IConfigurationElement element : elements) { - String modelPath = element.getAttribute(IExtendedTypeExtensionPoint.PATH); - String extendedTypeSetId = element.getAttribute(IExtendedTypeExtensionPoint.ID); - String contributorID = element.getContributor().getName(); - if(Platform.inDebugMode()) { - Activator.log.debug("[Reading extension point]"); - Activator.log.debug("- Path to the model: " + modelPath); - Activator.log.debug("- id of the container bundle: " + contributorID); - Activator.log.debug("- id of the extended type set: " + extendedTypeSetId); - } - ExtendedElementTypeSet set = getExtendedElementTypeSet(extendedTypeSetId, modelPath, contributorID); - if(set != null) { - platformElementTypeSets.add(set); - } - } - - return platformElementTypeSets; - } - - /** - *

    - * Loads the resource containing the extended element type set model. - *

    - *

    - * It looks the model file in the fragments first, then in the plugin itself.
    - * If this is already a fragment, it should look in the fragment only - *

    - * - * @param extendedTypesID - * id of the extended type set to load - * @param modelPath - * path of the model in the bundle - * @param bundleId - * id of the bundle containing the model file - * @return the loaded file or null if some problem occured during loading - */ - protected ExtendedElementTypeSet getExtendedElementTypeSet(String extendedTypesID, String modelPath, String bundleId) { - // 1. look in preferences. - String filePath = ExtendedTypesPreferences.getExtendedTypesRedefinition(extendedTypesID); - if(filePath != null) { - getExtendedElementTypeSetInPluginStateArea(extendedTypesID); - } - - // 2. no local redefinition. Load extended type set from plugin definition - Bundle bundle = Platform.getBundle(bundleId); - if(Platform.isFragment(bundle)) { - return getExtendedElementTypeSetInBundle(modelPath, bundleId); - } else { // this is a plugin. Search in sub fragments, then in the plugin - Bundle[] fragments = Platform.getFragments(bundle); - // no fragment, so the file should be in the plugin itself - if(fragments == null) { - return getExtendedElementTypeSetInBundle(modelPath, bundleId); - } else { - for(Bundle fragment : fragments) { - ExtendedElementTypeSet extendedElementTypeSet = getExtendedElementTypeSetInBundle(modelPath, fragment.getSymbolicName()); - if(extendedElementTypeSet != null) { - return extendedElementTypeSet; - } - } - // not found in fragments. Look in the plugin itself - return getExtendedElementTypeSetInBundle(modelPath, bundleId); - } - } - } - - /** - * Retrieves the contribution in the plugin area - * - * @param path - * the path of the element type set to load in the plugin area - */ - protected ExtendedElementTypeSet getExtendedElementTypeSetInPluginStateArea(String path) { - // read in preferences area - IPath resourcePath = Activator.getDefault().getStateLocation().append(path); - URI uri = URI.createFileURI(resourcePath.toOSString()); - if(uri != null && uri.isFile()) { - Resource resource = extendedTypesResourceSet.createResource(uri); - try { - resource.load(null); - } catch (IOException e) { - return null; - } - EObject content = resource.getContents().get(0); - if(content instanceof ExtendedElementTypeSet) { - return (ExtendedElementTypeSet)content; - } - Activator.log.error("Impossible to cast the object into an ExtendedElementTypeSet: " + content, null); - return null; - } - return null; - } - - /** - * - * @param modelPath - * path of the model in the bundle - * @param bundleId - * id of the bundle containing the model file - * @return the loaded file or null if some problem occured during loading - */ - protected ExtendedElementTypeSet getExtendedElementTypeSetInBundle(String modelPath, String bundleID) { - Resource resource = extendedTypesResourceSet.createResource(URI.createPlatformPluginURI(bundleID + Path.SEPARATOR + modelPath, true)); - try { - resource.load(null); - } catch (IOException e) { - return null; - } - EObject content = resource.getContents().get(0); - if(content instanceof ExtendedElementTypeSet) { - return (ExtendedElementTypeSet)content; - } - Activator.log.error("Impossible to cast the object into an ExtendedElementTypeSet: " + content, null); - return null; - } - - /** - * Gets the element type for id. May return null if this element is not registered. - * - * @param id - * the type ID - * @return the registered type with this ID, or null if there - * is none. - */ - public IElementType getType(String id) { - // 1. checks if the element already exists - IElementType type = ElementTypeRegistry.getInstance().getType(id); - - // 2. If it exists, returns it as usual - if(type != null) { - return type; - } - - // 3. It does not exists. It could be retrieve in the extended type sets - for(ExtendedElementTypeSet set : extendedTypeSets) { - for(ExtendedElementTypeConfiguration elementTypeConfiguration : set.getElementType()) { - if(id.equals(elementTypeConfiguration.getId())) { - // create and add in the standard registry the required element type from its configuration - @SuppressWarnings("restriction") - ISpecializationType createSpecializationType = ExtendedHintedTypeFactory.getInstance().createSpecializationType(new ExtendedSemanticTypeDescriptor(elementTypeConfiguration)); - // register it, so it should be accessible next time - ElementTypeRegistry.getInstance().register(createSpecializationType); - // retrieve papyrus client context and add the registered type to this context - IClientContext papyrusContext = ClientContextManager.getInstance().getClientContext("org.eclipse.papyrus.infra.services.edit.TypeContext"); - if(papyrusContext != null) { - papyrusContext.bindId(id); - } - return createSpecializationType; - } - } - } - return null; - } - -} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionConfigurationModelCreation.java new file mode 100644 index 00000000000..c86b7b93ee4 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionConfigurationModelCreation.java @@ -0,0 +1,22 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + + +/** + * Interface used to create new aspect action model element in the configuration model + */ +public interface IActionConfigurationModelCreation { + + public T createConfigurationModel(); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionContainerDescriptor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionContainerDescriptor.java new file mode 100644 index 00000000000..b5d4d094705 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionContainerDescriptor.java @@ -0,0 +1,28 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; + + +/** + * Descriptor for the configurable container descriptor + */ +public interface IActionContainerDescriptor extends IContainerDescriptor { + + /** + * Initializes the container descriptor using the given configuration + * @param actionConfiguration the confiugration for this container descriptor + */ + void init(T actionConfiguration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionCreationElementValidator.java new file mode 100644 index 00000000000..03aa776db99 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionCreationElementValidator.java @@ -0,0 +1,26 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + + +/** + * Interface implemented by all {@link ICreationElementValidator} configured by {@link ActionConfiguration} + */ +public interface IActionCreationElementValidator extends ICreationElementValidator { + + + /** + * Initialize the validator with the given action configuration + */ + void init(T configuration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionEditHelperAdvice.java new file mode 100644 index 00000000000..2de5c7c9aed --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IActionEditHelperAdvice.java @@ -0,0 +1,24 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; + + +/** + * + */ +public interface IActionEditHelperAdvice extends IEditHelperAdvice { + + public void init(T configuration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IAspectTypeExtensionPoint.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IAspectTypeExtensionPoint.java new file mode 100644 index 00000000000..1e38ab6ee06 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IAspectTypeExtensionPoint.java @@ -0,0 +1,42 @@ +/***************************************************************************** + * 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.infra.extendedtypes; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; + +/** + * Constants for the extension point aspectActionConfiguration (registering models containing definition of {@link ActionConfiguration}). + */ +public interface IAspectTypeExtensionPoint { + + /** ID of the extension point */ + public final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".aspectActionConfiguration"; + + /** attribute: name of the configuration */ + public static final String NAME = "name"; + + /** attribute: icon of the configuration */ + public static final String ICON = "icon"; + + /** attribute: description of the configuration */ + public static final String DESCRIPTION = "description"; + + public static final String CONTAINER_DESCRIPTOR_CLASS = "semanticTypeDescriptor"; + + public static final String EDIT_HELPER_ADVICE_CLASS = "editHelperAdvice"; + + public static final String CONFIGURATION_CLASS = "configurationClass"; + + public static final String CONFIGURATION_MODEL_CREATION = "configurationModelCreation"; + + public static final String CREATION_ELEMENT_VALIDATOR_CLASS = "creationElementValidator"; +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcher.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcher.java new file mode 100644 index 00000000000..b1b39334db9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcher.java @@ -0,0 +1,28 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + + +/** + * Interface implemented by all element matchers configured by a {@link MatcherConfiguration} + */ +public interface IConfigurableElementMatcher extends IElementMatcher { + + /** + * Inits the element matcher with the given contribution. Should be called once, after element matcher instantiation + * @param configuration the configuration of this {@link IElementMatcher} + */ + // public void init(T configuration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcherFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcherFactory.java new file mode 100644 index 00000000000..f403617ee0f --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IConfigurableElementMatcherFactory.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + + +/** + * interface for factories that instantiate {@link IInvariantElementMatcher} with their given configuration + */ +public interface IConfigurableElementMatcherFactory { + + /** + * Creates an element matcher with the specified configuration + * @param configuration the configuration of the {@link IElementMatcher} + * @return the created element matcher or null if none was created + */ + public IConfigurableElementMatcher createElementMatcher(T configuration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ICreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ICreationElementValidator.java new file mode 100644 index 00000000000..6adb16da294 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ICreationElementValidator.java @@ -0,0 +1,28 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; + + +/** + * Validator used to check if element can be created for a given {@link CreateElementRequest} + */ +public interface ICreationElementValidator { + + /** + * @param request + * @return + */ + public boolean canCreate(CreateElementRequest request); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java new file mode 100644 index 00000000000..d6f64e229fd --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java @@ -0,0 +1,22 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + + +/** + * Constants used by Papyrus edit helper advices + */ +public interface IEditHelperAdviceConstants { + + public String NO_UI_KEY = "no_ui"; +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherConfigurationModelCreation.java new file mode 100644 index 00000000000..e2bc20f5d9c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherConfigurationModelCreation.java @@ -0,0 +1,22 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + + +/** + * Interface that all extension point for element matcher should provide + */ +public interface IElementMatcherConfigurationModelCreation { + + public T createConfigurationModel(); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherExtensionPoint.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherExtensionPoint.java new file mode 100644 index 00000000000..4e417eabb82 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IElementMatcherExtensionPoint.java @@ -0,0 +1,34 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.papyrus.infra.extendedtypes.Activator; + + +/** + * Extension point interface for {@link MatcherConfiguration} runtime implementations + */ +public interface IElementMatcherExtensionPoint { + + /** ID of the extension point */ + public final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".elementMatcherConfiguration"; + + public static final String CONFIGURATION_NAME = "name"; + + public static final String MATCHER_CONFIGURATION_CLASS = "configurationClass"; + + public static final String MATCHER_FACTORY_CLASS = "factoryClass"; + + public static final String CONFIGURATION_MODEL_CREATION = "configurationModelCreation"; + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeFactory.java new file mode 100644 index 00000000000..d7d76c0e58d --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeFactory.java @@ -0,0 +1,38 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes; + +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; + + +/** + * Interface for all factories that will create element types from a given configuration + */ +public interface IExtendedElementTypeFactory /* extends IElementTypeFactory */ { + + /** + * Creates an element type for the given configuration + * @param configuration configuration of the element type to create + * @return the newly created element type or null if no element type could be created + */ + IExtendedHintedElementType createElementType(T configuration); + + + /** + * Creates the element creation validator which will be used to know if the element can be created or not + * @param configuration the configuration of the new element type + * @return the element creation Validator or null if none could be created + */ + ICreationElementValidator createElementCreationValidator(T configuration); + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeSetExtensionPoint.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeSetExtensionPoint.java new file mode 100644 index 00000000000..d8a900d1d13 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedElementTypeSetExtensionPoint.java @@ -0,0 +1,40 @@ +/***************************************************************************** + * 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.infra.extendedtypes; + + +/** + * Constants for the extension point ExtendedTypesSet (registering models containing definition of {@link ExtendedElementTypeSet}). + */ +public interface IExtendedElementTypeSetExtensionPoint { + + /** ID of the extension point */ + public final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".extendedElementTypeSet"; + + /** attribute: path to the model file in the bundle */ + public static final String PATH = "path"; + + /** attribute: identifier of the contribution */ + public static final String ID = "id"; + + /** attribute: name of the configuration */ + public static final String NAME = "name"; + + /** attribute: icon of the configuration */ + public static final String ICON = "icon"; + + /** attribute: description of the configuration */ + public static final String DESCRIPTION = "description"; + + /** element: element for the configuration element */ + public static final String CONFIGURATION = "configuration"; +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeConfigurationExtensionPoint.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeConfigurationExtensionPoint.java new file mode 100644 index 00000000000..254b53c4af2 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeConfigurationExtensionPoint.java @@ -0,0 +1,39 @@ +/***************************************************************************** + * 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.infra.extendedtypes; + +/** + * Constants for the extension point ExtendedTypesSet (registering models containing definition of {@link ExtendedElementTypeSet}). + */ +public interface IExtendedTypeConfigurationExtensionPoint { + + /** ID of the extension point */ + public final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".extendedTypeConfiguration"; + + /** attribute: name of the configuration */ + public static final String NAME = "name"; + + /** attribute: icon of the configuration */ + public static final String ICON = "icon"; + + /** attribute: description of the configuration */ + public static final String DESCRIPTION = "description"; + + /** attribute factoryClass */ + public static final String FACTORY_CLASS = "factoryClass"; + + /** attribute configurationClass */ + public static final String CONFIGURATION_CLASS = "configurationClass"; + + /** attribute itemProvider */ + public static final String ITEM_PROVIDER = "itemProvider"; +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeExtensionPoint.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeExtensionPoint.java deleted file mode 100644 index 515f92c97c2..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IExtendedTypeExtensionPoint.java +++ /dev/null @@ -1,40 +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.infra.extendedtypes; - - -/** - * Constants for the extension point - */ -public interface IExtendedTypeExtensionPoint { - - /** ID of the extension point */ - public final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".extendedTypesSetConfiguration"; - - /** attribute: path to the model file in the bundle */ - public static final String PATH = "path"; - - /** attribute: identifier of the contribution */ - public static final String ID = "id"; - - /** attribute: name of the configuration */ - public static final String NAME = "name"; - - /** attribute: icon of the configuration */ - public static final String ICON = "icon"; - - /** attribute: description of the configuration */ - public static final String DESCRIPTION = "description"; - - /** element: element for the configuration element */ - public static final String CONFIGURATION = "configuration"; -} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/advices/ExtendedTypesOwnerAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/advices/ExtendedTypesOwnerAdvice.java index 139ff2798c5..df13a584f95 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/advices/ExtendedTypesOwnerAdvice.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/advices/ExtendedTypesOwnerAdvice.java @@ -1,140 +1,232 @@ -/***************************************************************************** - * 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.infra.extendedtypes.advices; - -import java.util.List; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; -import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; -import org.eclipse.papyrus.infra.extendedtypes.Activator; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.providers.ExtendedElementTypeActionService; -import org.eclipse.papyrus.infra.extendedtypes.providers.ProviderNotFoundException; -import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; -import org.eclipse.papyrus.infra.queries.core.modisco.QueryUtil; - - -/** - * Advice for potential owners of Extended Element Types. This advice will help to the pre/post validation for the creation of child element which is - * describe by the extended type - */ -public class ExtendedTypesOwnerAdvice extends AbstractEditHelperAdvice { - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getBeforeCreateCommand(CreateElementRequest request) { - // test if the type element to be created is an extended one. If yes, test the validation queries. - // if they are valid, return identity command, which does nothing - // else, if not valid, return a not executable command - IElementType typeToCreate = request.getElementType(); - if(typeToCreate instanceof IExtendedHintedElementType) { - ExtendedElementTypeConfiguration configuration = ((IExtendedHintedElementType)typeToCreate).getConfiguration(); - List queryConfigurations = configuration.getPreValidation(); - if(queryConfigurations == null || queryConfigurations.isEmpty()) { - return super.getBeforeCreateCommand(request); - } - - // check all validation rules given by the configuration - for(Object objectToEdit : request.getElementsToEdit()) { - // there are queries to test - for(QueryConfiguration queryConfiguration : queryConfigurations) { - try { - boolean result = QueryUtil.evaluateBooleanQuery((EObject)objectToEdit, queryConfiguration); - if(!result) { - // return an unexecutable command, so the create command will not be executable - return UnexecutableCommand.INSTANCE; - } - } catch (Exception e) { - Activator.log.error(e); - } - } - } - - // Check all pre and post action validation rules. They are given by the provider of the action - CompositeCommand compositeCommand = new CompositeCommand("PreValidationPostAction"); - for(PostActionConfiguration postActionConfiguration : configuration.getPostAction()) { - ICommand command = null; - try { - command = ExtendedElementTypeActionService.getInstance().getPreValidationCommand(request.getElementsToEdit(), postActionConfiguration); - } catch (ProviderNotFoundException e) { - Activator.log.error(e); - } - if(command != null) { - compositeCommand.add(command); - } - } - // get the super command - ICommand superCommand = super.getBeforeCreateCommand(request); - - // if not null, adds it to the result - if(superCommand != null) { - compositeCommand.compose(superCommand); - } - - // if result not null, returns the composite command - if(!compositeCommand.isEmpty()) { - return compositeCommand; - } - return super.getBeforeCreateCommand(request); - } - return super.getBeforeCreateCommand(request); - } - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { - return super.getBeforeConfigureCommand(request); - } - - /** - * {@inheritDoc} - */ - @Override - protected ICommand getAfterConfigureCommand(ConfigureRequest request) { - // IElementType type = request.getTypeToConfigure(); - // if(type instanceof IExtendedHintedElementType) { - // CompositeCommand compositeCommand = new CompositeCommand("AfterConfigureCommand"); - // IExtendedHintedElementType extendedHintedElementType = (IExtendedHintedElementType)type; - // ExtendedElementTypeConfiguration configuration = extendedHintedElementType.getConfiguration(); - // for(PostActionConfiguration postActionConfiguration : configuration.getPostAction()) { - // ICommand command = null; - // try { - // command = ExtendedElementTypeActionService.getInstance().getICommand(request.getElementsToEdit(), postActionConfiguration); - // } catch (ProviderNotFoundException e) { - // Activator.log.error(e); - // } - // if(command != null) { - // compositeCommand.add(command); - // } - // } - // // return the composite command only if it is not empty - // if(!compositeCommand.isEmpty()) { - // return compositeCommand; - // } - // } - return super.getAfterConfigureCommand(request); - } -} +/***************************************************************************** + * 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.infra.extendedtypes.advices; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; + +/** + * Advice for potential owners of Extended Element Types. This advice will help to the pre/post validation for the creation of child element which is + * describe by the extended type + */ +public class ExtendedTypesOwnerAdvice extends AbstractEditHelperAdvice { + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + if(request instanceof CreateElementRequest) { + // approve the request for this element and all super types + IElementType typeToCreate = ((CreateElementRequest)request).getElementType(); + if(typeToCreate instanceof IExtendedHintedElementType) { + if(!approveCreationRequest(((IExtendedHintedElementType)typeToCreate), (CreateElementRequest)request)) { + return false; + } + // ask for extended super types + List superExtendedTypes = getAllSuperExtendedTypes((IExtendedHintedElementType)typeToCreate); + if(superExtendedTypes == null || superExtendedTypes.size() == 0) { + return super.approveRequest(request); + } else { + for(IExtendedHintedElementType superType : superExtendedTypes) { + // only refuse if one element refuses the request + if(!approveCreationRequest(superType, (CreateElementRequest)request)) { + return false; + } + } + } + } + } else if(request instanceof SetRequest) { + // check the feature to set is a containment feature and element to move is an extended element type + EStructuralFeature feature = ((SetRequest)request).getFeature(); + if(feature instanceof EReference) { + if(!((EReference)feature).isContainment()) { + return super.approveRequest(request); + } else { + // containment. Check the kind of element to edit + Object value = ((SetRequest)request).getValue(); + // value = single object or list ? + if(value instanceof EObject) { + IElementType type = ElementTypeRegistry.getInstance().getElementType((EObject)value, request.getClientContext()); + if(type instanceof IExtendedHintedElementType) { + return approveMoveRequest((IExtendedHintedElementType)type, (SetRequest)request); + } + } else if(value instanceof List) { + for(Object object : (List)value) { + if(object instanceof EObject) { + IElementType[] types = ElementTypeRegistry.getInstance().getAllTypesMatching((EObject)object, request.getClientContext()); + for(IElementType type : types) { + if(type instanceof IExtendedHintedElementType) { + if(!approveMoveRequest((IExtendedHintedElementType)type, (SetRequest)request)) { + return false; + } + List superExtendedTypes = getAllSuperExtendedTypes((IExtendedHintedElementType)type); + if(superExtendedTypes == null || superExtendedTypes.size() == 0) { + // nothing here + } else { + for(IExtendedHintedElementType superType : superExtendedTypes) { + // only refuse if one element refuses the request + if(!approveMoveRequest(superType, (SetRequest)request)) { + return false; + } + } + } + } + } + } + } + } + } + } + } else if(request instanceof MoveRequest) { + // check the feature to set is a containment feature and element to move is an extended element type + Map objectsToMove = ((MoveRequest)request).getElementsToMove(); + if(objectsToMove == null || objectsToMove.isEmpty()) { + return super.approveRequest(request); + } + for(Entry movedElement : objectsToMove.entrySet()) { + // do not compute with reference, this can be null. This could be interesting to check... + IElementType[] types = ElementTypeRegistry.getInstance().getAllTypesMatching(movedElement.getKey(), request.getClientContext()); + for(IElementType type : types) { + if(type instanceof IExtendedHintedElementType) { + if(!approveMoveRequest((IExtendedHintedElementType)type, movedElement.getKey(), (MoveRequest)request)) { + return false; + } + List superExtendedTypes = getAllSuperExtendedTypes((IExtendedHintedElementType)type); + if(superExtendedTypes == null || superExtendedTypes.size() == 0) { + // nothing here + } else { + for(IExtendedHintedElementType superType : superExtendedTypes) { + // only refuse if one element refuses the request + if(!approveMoveRequest(superType, movedElement.getKey(), (MoveRequest)request)) { + return false; + } + } + } + } + } + } + return super.approveRequest(request); + } + return super.approveRequest(request); + } + + /** + * @param iExtendedHintedElementType + * @param request + * @return + */ + protected boolean approveCreationRequest(IExtendedHintedElementType typeToCreate, CreateElementRequest request) { + IContainerDescriptor containerDescriptor = typeToCreate.getEContainerDescriptor(); + EObject newContainer = request.getContainer(); + // check it matches the container descriptor for the element type + if(containerDescriptor == null || newContainer == null) { + return true; + } + if(containerDescriptor.getContainmentFeatures() != null && containerDescriptor.getContainmentFeatures().length > 0) { + // check containment feature + List references = Arrays.asList(containerDescriptor.getContainmentFeatures()); + if(!(references.contains(request.getContainmentFeature()))) { + return false; + } + } + IElementMatcher containerMatcher = containerDescriptor.getMatcher(); + if(containerMatcher != null) { + return containerMatcher.matches(newContainer); + } + // check container is matching the matcher of the container descriptor for the new type + return true; + } + + protected boolean approveMoveRequest(IExtendedHintedElementType typeToMove, SetRequest request) { + IContainerDescriptor containerDescriptor = typeToMove.getEContainerDescriptor(); + EObject newContainer = request.getElementToEdit(); + // check it matches the container descriptor for the element type + if(containerDescriptor == null || newContainer == null) { + return true; + } + if(containerDescriptor.getContainmentFeatures() != null && containerDescriptor.getContainmentFeatures().length > 0) { + // check containment feature + List references = Arrays.asList(containerDescriptor.getContainmentFeatures()); + if(!(references.contains(request.getFeature()))) { + return false; + } + } + IElementMatcher containerMatcher = containerDescriptor.getMatcher(); + if(containerMatcher != null) { + return containerMatcher.matches(newContainer); + } + // check container is matching the matcher of the container descriptor for the new type + return true; + } + + protected boolean approveMoveRequest(IExtendedHintedElementType typeToMove, EObject objectToMove, MoveRequest request) { + IContainerDescriptor containerDescriptor = typeToMove.getEContainerDescriptor(); + EObject newContainer = request.getTargetContainer(); + // check it matches the container descriptor for the element type + if(containerDescriptor == null || newContainer == null) { + return true; + } + if(containerDescriptor.getContainmentFeatures() != null && containerDescriptor.getContainmentFeatures().length > 0) { + // check containment feature + List references = Arrays.asList(containerDescriptor.getContainmentFeatures()); + if(!(references.contains(request.getTargetFeature(objectToMove)))) { + return false; + } + } + IElementMatcher containerMatcher = containerDescriptor.getMatcher(); + if(containerMatcher != null) { + return containerMatcher.matches(newContainer); + } + // check container is matching the matcher of the container descriptor for the new type + return true; + } + + public List getAllSuperExtendedTypes(IExtendedHintedElementType type) { + IElementType[] superTypes = type.getAllSuperTypes(); + if(superTypes.length == 0) { + return Collections.emptyList(); + } + List superExtendedTypes = new ArrayList(); + // get the reverse order (the extended element types are the closest types + for(int i = superTypes.length - 1; i >= 0; i--) { + if(superTypes[i] instanceof IExtendedHintedElementType) { + superExtendedTypes.add((IExtendedHintedElementType)superTypes[i]); + } /* + * else { // optimization: once we are in the hierarchy of "standard" types, we should not go into this hierarchy + * return superExtendedTypes; + * } + */ + } + return superExtendedTypes; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java new file mode 100644 index 00000000000..68a6ed2f951 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java @@ -0,0 +1,148 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.handler; + +import java.util.Iterator; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.emf.common.util.URI; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeSetUtils; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSetRegistry; +import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.statushandlers.StatusManager; + + +/** + * Handler to deploy new configuration + */ +public class DeployExtendedTypeSetConfigurationHandler extends AbstractHandler implements IHandler { + + /** + * {@inheritDoc} + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection currentSelection = HandlerUtil.getCurrentSelection(event); + if(!(currentSelection instanceof IStructuredSelection) || currentSelection.isEmpty()) { + return null; + } + + final IStructuredSelection selection = (IStructuredSelection)currentSelection; + + final Shell activeShell = HandlerUtil.getActiveShell(event); + + Job job = new Job("Deploy extended type set configuration") { + + @Override + protected IStatus run(IProgressMonitor monitor) { + monitor.beginTask("Deploying selected configurations", selection.size()); + + return doExecute(selection, monitor); + } + }; + + job.addJobChangeListener(new JobChangeAdapter() { + + @Override + public void done(final IJobChangeEvent event) { + activeShell.getDisplay().asyncExec(new Runnable() { + + public void run() { + if(event.getResult().isOK()) { + MessageDialog.openInformation(activeShell, "Success", event.getResult().getMessage()); + } else if(event.getResult().getSeverity() < IStatus.ERROR) { //Errors are already logged + StatusManager.getManager().handle(event.getResult(), StatusManager.SHOW); + } + } + }); + } + }); + + job.setUser(true); + job.schedule(); + + return null; + } + + protected IStatus doExecute(IStructuredSelection selection, IProgressMonitor monitor) { + Iterator selectionIterator = selection.iterator(); + + MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, "The properties view configuration has been successfully deployed and activated", null); + + while(selectionIterator.hasNext()) { + Object selectedElement = selectionIterator.next(); + if(selectedElement instanceof IAdaptable) { + IFile selectedFile = (IFile)((IAdaptable)selectedElement).getAdapter(IFile.class); + if(selectedFile == null) { + monitor.worked(1); + result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a file")); + continue; + } + + + String fileName = selectedFile.getFullPath().removeFileExtension().lastSegment(); + monitor.subTask("Deploy " + fileName); + + URI emfURI = null; + if(selectedFile.getFullPath() != null) { + emfURI = URI.createPlatformResourceURI(selectedFile.getFullPath().toString(), true); + } else if(selectedFile.getRawLocation() != null) { + emfURI = URI.createFileURI(selectedFile.getRawLocation().toString()); + } + + if(emfURI == null) { + monitor.worked(1); + result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a valid configuration file")); + continue; + } + + ExtendedTypesPreferences.registerWorkspaceDefinition(fileName, selectedFile.getFullPath().toString()); + + monitor.subTask("Reset Element Types Registry"); + ExtendedElementTypeSetRegistry.getInstance().loadExtendedElementTypeSet(fileName); + monitor.worked(1); + + result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, "The extended types configuration has been successfully deployed and activated")); + } + } + + if(result.getChildren().length == 1) { + return result.getChildren()[0]; + } else { //Merge the result and specify an appropriate message based on the result + if(result.isOK()) { + return result; + } else { + MultiStatus actualResult = new MultiStatus(Activator.PLUGIN_ID, result.getCode(), "Some errors occurred during the deployment", result.getException()); + actualResult.merge(result); + return actualResult; + } + } + } +} \ No newline at end of file diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java new file mode 100644 index 00000000000..35753a5c294 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java @@ -0,0 +1,149 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.handler; + +import java.util.Iterator; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; +import org.eclipse.emf.common.util.URI; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.ElementTypeSetUtils; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSetRegistry; +import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.statushandlers.StatusManager; + + +/** + * @author RS211865 + */ +public class UndeployExtendedTypeSetConfigurationHandler extends AbstractHandler { + + /** + * {@inheritDoc} + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + ISelection currentSelection = HandlerUtil.getCurrentSelection(event); + if(!(currentSelection instanceof IStructuredSelection) || currentSelection.isEmpty()) { + return null; + } + + final IStructuredSelection selection = (IStructuredSelection)currentSelection; + + final Shell activeShell = HandlerUtil.getActiveShell(event); + + Job job = new Job("Undeploy extended type set configuration") { + + @Override + protected IStatus run(IProgressMonitor monitor) { + monitor.beginTask("Undeploying selected configurations", selection.size()); + + return doExecute(selection, monitor); + } + }; + + job.addJobChangeListener(new JobChangeAdapter() { + + @Override + public void done(final IJobChangeEvent event) { + activeShell.getDisplay().asyncExec(new Runnable() { + + public void run() { + if(event.getResult().isOK()) { + MessageDialog.openInformation(activeShell, "Success", event.getResult().getMessage()); + } else if(event.getResult().getSeverity() < IStatus.ERROR) { //Errors are already logged + StatusManager.getManager().handle(event.getResult(), StatusManager.SHOW); + } + } + }); + } + }); + + job.setUser(true); + job.schedule(); + + return null; + } + + protected IStatus doExecute(IStructuredSelection selection, IProgressMonitor monitor) { + Iterator selectionIterator = selection.iterator(); + + MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, "The extended types configuration has been successfully undeployed", null); + + while(selectionIterator.hasNext()) { + Object selectedElement = selectionIterator.next(); + if(selectedElement instanceof IAdaptable) { + IFile selectedFile = (IFile)((IAdaptable)selectedElement).getAdapter(IFile.class); + if(selectedFile == null) { + monitor.worked(1); + result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a file")); + continue; + } + + + String fileName = selectedFile.getFullPath().removeFileExtension().lastSegment(); + monitor.subTask("Deploy " + fileName); + + URI emfURI = null; + if(selectedFile.getFullPath() != null) { + emfURI = URI.createPlatformResourceURI(selectedFile.getFullPath().toString(), true); + } else if(selectedFile.getRawLocation() != null) { + emfURI = URI.createFileURI(selectedFile.getRawLocation().toString()); + } + + if(emfURI == null) { + monitor.worked(1); + result.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected element is not a valid configuration file")); + continue; + } + + ExtendedTypesPreferences.unregisterWorkspaceDefinition(fileName); + + monitor.subTask("Reset Element Types Registry"); + ExtendedElementTypeSetRegistry.getInstance().unload(fileName); + monitor.worked(1); + + // relaunch papyrus service + + result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, "The extended types configuration has been successfully undeployed")); + } + } + + if(result.getChildren().length == 1) { + return result.getChildren()[0]; + } else { //Merge the result and specify an appropriate message based on the result + if(result.isOK()) { + return result; + } else { + MultiStatus actualResult = new MultiStatus(Activator.PLUGIN_ID, result.getCode(), "Some errors occurred during the undeployment", result.getException()); + actualResult.merge(result); + return actualResult; + } + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationContainerDescriptor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationContainerDescriptor.java new file mode 100644 index 00000000000..5618ec76aa9 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationContainerDescriptor.java @@ -0,0 +1,120 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IClientContext; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantContainerDescriptor; +import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext; + +/** + * @author RS211865 + */ +public class InvariantContainerConfigurationContainerDescriptor implements IInvariantContainerDescriptor { + + protected EList permissions; + + private IClientContext sharedContext; + + private IElementMatcher matcher; + + /** + * {@inheritDoc} + */ + public IElementMatcher getMatcher() { + if(matcher == null) { + matcher = createMatcher(); + } + return matcher; + } + + /** + * @return + */ + protected IElementMatcher createMatcher() { + return new IElementMatcher() { + + public boolean matches(EObject eObject) { + if(eObject==null) { + return false; + } + + IElementType[] types = ElementTypeRegistry.getInstance().getAllTypesMatching(eObject, sharedContext); + if(types == null || types.length == 0) { + return false; + } + boolean isValid = false; + for(HierarchyPermission permission : permissions) { + boolean isPermitted = permission.isIsPermitted(); + String childType = permission.getChildType(); + boolean isStrict = permission.isIsStrict(); + IElementType type = ElementTypeRegistry.getInstance().getType(childType); + if(type != null) { + if(isStrict) { + if(types[0].equals(type)) { + if(isPermitted) { + isValid = true; + } + } else if(!isPermitted) { + isValid = false; + } + } else { + // not strict. The super types of typeToCreate should contain the permission type if permitted, or not contain the permission type if not permitted + List allTypes = Arrays.asList(types); + if(allTypes.contains(type)) { + if(isPermitted) { + isValid = true; + } else if(!isPermitted) { + isValid = false; + } + } + } + } + } + return isValid; + } + }; + } + + /** + * {@inheritDoc} + */ + public EReference[] getContainmentFeatures() { + // TODO should implement in permissions... + return null; + } + + /** + * {@inheritDoc} + */ + public void init(InvariantContainerConfiguration ruleConfiguration) { + this.permissions = ruleConfiguration.getPermissions(); + try { + sharedContext = TypeContext.getContext(); + } catch (ServiceException e) { + Activator.log.error(e); + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationModelCreation.java new file mode 100644 index 00000000000..cf69922c6cc --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerConfigurationModelCreation.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantConfigurationModelCreation; + + +/** + * @author RS211865 + */ +public class InvariantContainerConfigurationModelCreation implements IInvariantConfigurationModelCreation { + + /** + * {@inheritDoc} + */ + public InvariantContainerConfiguration createConfigurationModel() { + return InvariantContainerConfigurationFactory.eINSTANCE.createInvariantContainerConfiguration(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerEditHelperAdvice.java new file mode 100644 index 00000000000..892cce73c79 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerEditHelperAdvice.java @@ -0,0 +1,141 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IClientContext; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantEditHelperAdvice; +import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext; + +/** + * Edit Helper advice configured by the {@link InvariantHierarchyConfiguration} + */ +public class InvariantContainerEditHelperAdvice extends AbstractEditHelperAdvice implements IInvariantEditHelperAdvice { + + protected List permissions; + + protected IClientContext sharedContext; + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + if(request instanceof SetRequest) { + SetRequest setRequest = ((SetRequest)request); + EStructuralFeature structuralFeature = setRequest.getFeature(); + if(structuralFeature instanceof EReference) { + EReference reference = ((EReference)structuralFeature); + if(reference.isContainment() && setRequest.getValue() != null) { + // check new value + return canContain(setRequest); + } + } + } else if(request instanceof CreateElementRequest) { + CreateElementRequest createElementRequest = ((CreateElementRequest)request); + IElementType typeToCreate = createElementRequest.getElementType(); + boolean approvedRequest = isValid(typeToCreate, false); + return approvedRequest; + } + return super.approveRequest(request); + } + + protected boolean isValid(IElementType typeToAdd, boolean baseIsValid) { + boolean isValid = baseIsValid; + for(HierarchyPermission permission : permissions) { + boolean isPermitted = permission.isIsPermitted(); + String childType = permission.getChildType(); + boolean isStrict = permission.isIsStrict(); + IElementType type = ElementTypeRegistry.getInstance().getType(childType); + if(type != null) { + if(isStrict) { + if(typeToAdd.equals(type)) { + if(isPermitted) { + isValid = true; + } + } else if(!isPermitted) { + isValid = false; + } + } else { + // not strict. The super types of typeToCreate should contain the permission type if permitted, or not contain the permission type if not permitted + List allTypes = Arrays.asList(typeToAdd.getAllSuperTypes()); + allTypes.add(typeToAdd); + if(allTypes.contains(type)) { + if(isPermitted) { + isValid = true; + } + } else if(!isPermitted) { + isValid = false; + } + } + } + } + return isValid; + } + + + protected boolean canContain(SetRequest request) { + // multivalue or simple value ? + if(request.getValue() instanceof List) { + List values = (List)request.getValue(); + for(Object value : values) { + if(value instanceof EObject) { + IElementType type = ElementTypeRegistry.getInstance().getElementType((EObject)value, request.getClientContext()); + if(type !=null) { + if(!isValid(type, false)) { + return false; + } + } else { + return false; + } + } + } + } else { + if(request.getValue() instanceof EObject) { + IElementType type = ElementTypeRegistry.getInstance().getElementType((EObject)request.getValue(), request.getClientContext()); + if(type !=null) { + return isValid(type, false); + } else { + return false; + } + } + } + return true; + } + + + /** + * {@inheritDoc} + */ + public void init(InvariantContainerConfiguration configuration) { + try { + sharedContext = TypeContext.getContext(); + } catch (ServiceException e) { + Activator.log.error(e); + } + permissions = configuration.getPermissions(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerMatcher.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerMatcher.java new file mode 100644 index 00000000000..23fa5a99dd0 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerMatcher.java @@ -0,0 +1,148 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantcontainerconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantElementMatcher; + +/** + * Matcher of the hierarchy matcher + */ +public class InvariantContainerMatcher implements IInvariantElementMatcher { + + protected EList permissions; + + /** + * + */ + public InvariantContainerMatcher() { + // nothing here. Trying not to create list to avoid unnecessary created objects + } + + /** + * {@inheritDoc} + */ + public boolean matches(EObject eObject) { + return true; +// boolean matches = false; +// +// EObject container = eObject.eContainer(); +// +// if(container ==null) { +// return false; +// } +// +// matches = checkAllowed(container, allowedDirectParents, false); +// +// // if not ok in direct parents, test in the hierarchy +// if(!matches && allowedParentsInHierarchy!=null && !allowedParentsInHierarchy.isEmpty()) { +// while(!matches && container.eContainer() !=null) { +// container = container.eContainer(); +// matches = checkAllowed(container, allowedParentsInHierarchy, false); +// } +// } +// +// // check now that some forbidden type does not override the current matches +// if(!matches) { +// return false; +// } +// +// container = eObject.eContainer(); +// // container (direct or indirect) could match. now try the forbidden lists +// matches = checkForbidden(container, forbiddenDirectParents, false); +// +// // if not ok in direct parents, test in the hierarchy +// if(matches && forbiddenParentsInHierarchy!=null && !forbiddenParentsInHierarchy.isEmpty()) { +// while(matches && container.eContainer() !=null) { +// container = container.eContainer(); +// matches = checkForbidden(container, forbiddenParentsInHierarchy, false); +// } +// } +// +// return matches; + } + + /** + * @param container + * @param forbiddenParentsInHierarchy2 + * @param b + * @return + */ + protected boolean checkForbidden(EObject container, List forbiddenParents, boolean isStrict) { + // check direct permissions + if(forbiddenParents != null && !forbiddenParents.isEmpty()) { + IElementType parentType = ElementTypeRegistry.getInstance().getElementType(container); + if(parentType != null) { + // check if necessary all super types of the direct parent + List parentIds = new ArrayList(); + parentIds.add(parentType.getId()); + if(forbiddenParents.contains(parentIds)) { + return false; + } else { + // check also super types ids, if not strict permission + if(!isStrict) { + for(IElementType superType : parentType.getAllSuperTypes()) { + if(forbiddenParents.contains(superType.getId())) { + return false; + } + } + } + } + } + } + return true; + } + + /** + * + */ + protected boolean checkAllowed(EObject container, List allowedParents, boolean isStrict) { + boolean matches = false; + // check direct permissions + if(allowedParents != null && !allowedParents.isEmpty()) { + IElementType parentType = ElementTypeRegistry.getInstance().getElementType(container); + if(parentType != null) { + // check if necessary all super types of the direct parent + List parentIds = new ArrayList(); + parentIds.add(parentType.getId()); + if(allowedParents.contains(parentIds)) { + matches = true; + } else { + // check also super types ids, if not strict permission + if(!isStrict) { + for(IElementType superType : parentType.getAllSuperTypes()) { + if(allowedParents.contains(superType.getId())) { + matches = true; + break; + } + } + } + } + } + } + return matches; + } + + /** + * {@inheritDoc} + */ + public void init(InvariantContainerConfiguration configuration) { + this.permissions = configuration.getPermissions(); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleCreationElementValidator.java new file mode 100644 index 00000000000..415bb90cae8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleCreationElementValidator.java @@ -0,0 +1,52 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; + + +/** + * + */ +public class AndRuleCreationElementValidator implements IInvariantCreationElementValidator { + + protected List> composedValidators; + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + for(IInvariantCreationElementValidator creationElementValidator : composedValidators) { + if(!creationElementValidator.canCreate(request)) { + return false; + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public void init(AndRule configuration) { + composedValidators = new ArrayList>(); + for(InvariantRuleConfiguration composedRule : configuration.getComposedRules()) { + IInvariantCreationElementValidator creationElementValidator = RuleConfigurationFactoryRegistry.getInstance().createCreationElementValidator(composedRule); + if(creationElementValidator != null) { + composedValidators.add(creationElementValidator); + } + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleEditHelperAdvice.java new file mode 100644 index 00000000000..3178adffbfd --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleEditHelperAdvice.java @@ -0,0 +1,56 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; + +public class AndRuleEditHelperAdvice extends AbstractEditHelperAdvice implements IInvariantEditHelperAdvice { + + protected List> composedEditHelperAdvices; + + public AndRuleEditHelperAdvice() { + } + + /** + * {@inheritDoc} + */ + public void init(AndRule ruleConfiguration) { + // configuration should be a AndRule as declared in the extension point + composedEditHelperAdvices = new ArrayList>(); + for(InvariantRuleConfiguration composedRule : ruleConfiguration.getComposedRules()) { + IInvariantEditHelperAdvice editHelperAdvice = RuleConfigurationFactoryRegistry.getInstance().createEditHelperAdvice(composedRule); + if(editHelperAdvice != null) { + composedEditHelperAdvices.add(editHelperAdvice); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + // to approve the request, all the composed edit helper advices should approve it + for(IEditHelperAdvice advice : composedEditHelperAdvices) { + if(!advice.approveRequest(request)) { + return false; + } + } + return true; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleElementMatcher.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleElementMatcher.java new file mode 100644 index 00000000000..09707a0c286 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/AndRuleElementMatcher.java @@ -0,0 +1,65 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + +/** + * {@link IElementMatcher} for the {@link AndRule} + */ +public class AndRuleElementMatcher implements IInvariantElementMatcher { + + protected List composedMatchers; + + /** + * + */ + public AndRuleElementMatcher() { + // Nothing here + } + + /** + * {@inheritDoc} + */ + public boolean matches(EObject eObject) { + // deactivate if list of rules is empty + if(composedMatchers == null || composedMatchers.isEmpty()) { + return false; + } + for(IElementMatcher matcher : composedMatchers) { + if(!matcher.matches(eObject)) { + return false; + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public void init(AndRule configuration) { + // for each children configuraton, generates the matcher class and then, the 'matches' method of this matcher will delegate to the matches of the sub rules, and will add all results together + // configuration should be a AndRule as declared in the extension point + composedMatchers = new ArrayList(); + for(InvariantRuleConfiguration composedRule : configuration.getComposedRules()) { + IElementMatcher matcher = RuleConfigurationFactoryRegistry.getInstance().createMatcher(composedRule); + if(matcher != null) { + composedMatchers.add(matcher); + } + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantConfigurationModelCreation.java new file mode 100644 index 00000000000..9ffe2a2dc57 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantConfigurationModelCreation.java @@ -0,0 +1,22 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + + +/** + * Interface used to create new invariant rule model element in the configuration model + */ +public interface IInvariantConfigurationModelCreation { + + public T createConfigurationModel(); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantContainerDescriptor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantContainerDescriptor.java new file mode 100644 index 00000000000..9ee32bfe8d8 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantContainerDescriptor.java @@ -0,0 +1,27 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; + + +/** + * Descriptor for the configurable container descriptor + */ +public interface IInvariantContainerDescriptor extends IContainerDescriptor { + + /** + * @param ruleConfiguration + */ + void init(T ruleConfiguration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantCreationElementValidator.java new file mode 100644 index 00000000000..b46c5bcd43a --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantCreationElementValidator.java @@ -0,0 +1,24 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator; + + +/** + * + */ +public interface IInvariantCreationElementValidator extends ICreationElementValidator { + + void init(T configuration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantEditHelperAdvice.java new file mode 100644 index 00000000000..7e94b39c9a4 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantEditHelperAdvice.java @@ -0,0 +1,28 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; + +/** + * Interface for all {@link IEditHelperAdvice} that are configured by an {@link InvariantRuleConfiguration}. + */ +public interface IInvariantEditHelperAdvice extends IEditHelperAdvice { + + /** + * Inits the edit helper advice with its given configuration + * + * @param ruleConfiguration the configuration of the edit helper advice + */ + void init(T ruleConfiguration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantElementMatcher.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantElementMatcher.java new file mode 100644 index 00000000000..3b3b7112b24 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantElementMatcher.java @@ -0,0 +1,28 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + + +/** + * Interface that all {@link IElementMatcher} that can be configured at runtime using a model should implement + */ +public interface IInvariantElementMatcher extends IElementMatcher { + + /** + * Initialize the element matcher with the given configuration + * @param configuration the runtime configuration of the matcher + */ + void init(T configuration); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantRuleExtensionPoint.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantRuleExtensionPoint.java new file mode 100644 index 00000000000..399879f659f --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/IInvariantRuleExtensionPoint.java @@ -0,0 +1,38 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.Activator; + + +/** + * @author RS211865 + */ +public interface IInvariantRuleExtensionPoint { + + /** ID of the extension point */ + public final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".invariantRule"; + + public static final String ELEMENT_MATCHER_CLASS = "elementMatcher"; + + public static final String CONTAINER_DESCRIPTOR_CLASS = "semanticTypeDescriptor"; + + public static final String EDIT_HELPER_ADVICE_CLASS = "editHelperAdvice"; + + public static final String RULE_CONFIGURATION_CLASS = "configurationClass"; + + public static final String CONFIGURATION_MODEL_CREATION = "configurationModelCreation"; + + public static final String CREATION_ELEMENT_VALIDATOR_CLASS = "creationElementValidator"; + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java new file mode 100644 index 00000000000..d5f13e06fdb --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java @@ -0,0 +1,80 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.Arrays; +import java.util.Collections; + +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.AbstractConfigurableElementTypeFactory; +import org.eclipse.papyrus.infra.extendedtypes.ComposedElementMatcher; +import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator; + +/** + * Factory used to create ElementType from a {@link InvariantSemanticTypeConfiguration}. + */ +public class InvariantElementTypeFactory extends AbstractConfigurableElementTypeFactory { + + /** + * {@inheritDoc} + */ + public ICreationElementValidator createElementCreationValidator(InvariantSemanticTypeConfiguration configuration) { + return RuleConfigurationFactoryRegistry.getInstance().createCreationElementValidator(configuration.getInvariantRuleConfiguration()); + } + + /** + * {@inheritDoc} + */ + @Override + protected String getSemanticHint(InvariantSemanticTypeConfiguration configuration) { + return configuration.getHint(); + } + + /** + * {@inheritDoc} + */ + @Override + protected IEditHelperAdvice createEditHelperAdvice(InvariantSemanticTypeConfiguration configuration) { + return RuleConfigurationFactoryRegistry.getInstance().createEditHelperAdvice(configuration.getInvariantRuleConfiguration()); + } + + /** + * {@inheritDoc} + */ + @Override + protected IContainerDescriptor createContainerDescriptor(InvariantSemanticTypeConfiguration configuration) { + return RuleConfigurationFactoryRegistry.getInstance().createContainerDescriptor(configuration.getInvariantRuleConfiguration()); + } + + /** + * {@inheritDoc} + */ + @Override + protected IElementMatcher createElementMatcher(InvariantSemanticTypeConfiguration configuration) { + IElementMatcher superMatcher = super.createElementMatcher(configuration); + if(superMatcher !=null) { + // create a composed matcher to have the matcher described by the model configuration element type and the one for the specific invariants + IElementMatcher invariantMatcher = RuleConfigurationFactoryRegistry.getInstance().createMatcher(configuration.getInvariantRuleConfiguration()); + if(invariantMatcher!=null) { + ComposedElementMatcher composedMatcher = new ComposedElementMatcher(Arrays.asList(superMatcher, invariantMatcher)); + return composedMatcher; + } + return superMatcher; + } + // no configured matcher. Return the invariant one + return RuleConfigurationFactoryRegistry.getInstance().createMatcher(configuration.getInvariantRuleConfiguration()); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeContainerDescriptor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeContainerDescriptor.java new file mode 100644 index 00000000000..016fbfc7b7c --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeContainerDescriptor.java @@ -0,0 +1,47 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.emf.ecore.EReference; +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + + +/** + * @author RS211865 + */ +public class InvariantSemanticTypeContainerDescriptor implements IContainerDescriptor { + + /** + * @param configuration + */ + public InvariantSemanticTypeContainerDescriptor(InvariantSemanticTypeConfiguration configuration) { + + } + + /** + * {@inheritDoc} + */ + public IElementMatcher getMatcher() { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public EReference[] getContainmentFeatures() { + // TODO Auto-generated method stub + return null; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeEditHelperAdvice.java new file mode 100644 index 00000000000..4d563ce3d03 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantSemanticTypeEditHelperAdvice.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; + + +/** + * Advice based on invariants + */ +public class InvariantSemanticTypeEditHelperAdvice extends AbstractEditHelperAdvice { + + /** + * @param configuration + */ + public InvariantSemanticTypeEditHelperAdvice(InvariantSemanticTypeConfiguration configuration) { + // TODO Auto-generated constructor stub + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleCreationElementValidator.java new file mode 100644 index 00000000000..810510e6200 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleCreationElementValidator.java @@ -0,0 +1,52 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; + + +/** + * @author RS211865 + */ +public class OrRuleCreationElementValidator implements IInvariantCreationElementValidator { + + protected List> composedValidators; + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + for(IInvariantCreationElementValidator creationElementValidator : composedValidators) { + if(creationElementValidator.canCreate(request)) { + return true; + } + } + return false; + } + + /** + * {@inheritDoc} + */ + public void init(OrRule configuration) { + composedValidators = new ArrayList>(); + for(InvariantRuleConfiguration composedRule : configuration.getComposedRules()) { + IInvariantCreationElementValidator creationElementValidator = RuleConfigurationFactoryRegistry.getInstance().createCreationElementValidator(composedRule); + if(creationElementValidator != null) { + composedValidators.add(creationElementValidator); + } + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleEditHelperAdvice.java new file mode 100644 index 00000000000..119caa57c8d --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleEditHelperAdvice.java @@ -0,0 +1,61 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; + + +/** + * @author RS211865 + */ +public class OrRuleEditHelperAdvice extends AbstractEditHelperAdvice implements IInvariantEditHelperAdvice { + + protected List> composedEditHelperAdvices; + + public OrRuleEditHelperAdvice() { + } + + /** + * {@inheritDoc} + */ + public void init(OrRule ruleConfiguration) { + // configuration should be a AndRule as declared in the extension point + composedEditHelperAdvices = new ArrayList>(); + for(InvariantRuleConfiguration composedRule : ruleConfiguration.getComposedRules()) { + IInvariantEditHelperAdvice editHelperAdvice = RuleConfigurationFactoryRegistry.getInstance().createEditHelperAdvice(composedRule); + if(editHelperAdvice != null) { + composedEditHelperAdvices.add(editHelperAdvice); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + // to approve the request, all the composed edit helper advices should approve it + for(IEditHelperAdvice advice : composedEditHelperAdvices) { + if(advice.approveRequest(request)) { + return true; + } + } + // return no only if no advice approves the request. As soon as one approves, return true + return false; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleElementMatcher.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleElementMatcher.java new file mode 100644 index 00000000000..648b4090642 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/OrRuleElementMatcher.java @@ -0,0 +1,65 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; + +/** + * @author RS211865 + */ +public class OrRuleElementMatcher implements IInvariantElementMatcher { + + protected List composedMatchers; + + /** + * + */ + public OrRuleElementMatcher() { + // nothing here + } + + /** + * {@inheritDoc} + */ + public boolean matches(EObject eObject) { + // deactivate if list of rules is empty + if(composedMatchers == null || composedMatchers.isEmpty()) { + return false; + } + for(IElementMatcher matcher : composedMatchers) { + if(matcher.matches(eObject)) { + return true; + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public void init(OrRule configuration) { + // for each children configuraton, generates the matcher class and then, the 'matches' method of this matcher will delegate to the matches of the sub rules, and will add all results together + // configuration should be a AndRule as declared in the extension point + composedMatchers = new ArrayList(); + for(InvariantRuleConfiguration composedRule : configuration.getComposedRules()) { + IElementMatcher matcher = RuleConfigurationFactoryRegistry.getInstance().createMatcher(composedRule); + if(matcher != null) { + composedMatchers.add(matcher); + } + } + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/RuleConfigurationFactoryRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/RuleConfigurationFactoryRegistry.java new file mode 100644 index 00000000000..3d5dfda2c9d --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/RuleConfigurationFactoryRegistry.java @@ -0,0 +1,456 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration; + +import java.lang.ref.WeakReference; +import java.util.Collections; +import java.util.Dictionary; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.osgi.framework.Bundle; + +/** + * Registry for all matcher factories. + */ +public class RuleConfigurationFactoryRegistry { + + /** private singleton instance */ + private static RuleConfigurationFactoryRegistry registry; + + /** map configuration type to matcher descriptor */ + protected Map configurationTypeToClassDescriptor = null; + + /** + * returns the singleton instance of this registry + * + * @return the singleton instance of this registry + */ + public static synchronized RuleConfigurationFactoryRegistry getInstance() { + if(registry == null) { + registry = new RuleConfigurationFactoryRegistry(); + registry.init(); + } + return registry; + } + + /** + * Inits the registry. + */ + protected void init() { + configurationTypeToClassDescriptor = new HashMap(); + //read invariant rule configuration etension point + IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(IInvariantRuleExtensionPoint.EXTENSION_POINT_ID); + // for each element, parses and retrieve the model file. then loads it and returns the root element + for(IConfigurationElement configurationElement : elements) { + // contributor will always be the same, but implementation could be different. + String contributorName = configurationElement.getContributor().getName(); + + String configurationClass = configurationElement.getAttribute(IInvariantRuleExtensionPoint.RULE_CONFIGURATION_CLASS); + + String matcherClassName = configurationElement.getAttribute(IInvariantRuleExtensionPoint.ELEMENT_MATCHER_CLASS); + String editHelperAdviceClassName = configurationElement.getAttribute(IInvariantRuleExtensionPoint.EDIT_HELPER_ADVICE_CLASS); + String containerDescriptorClassName = configurationElement.getAttribute(IInvariantRuleExtensionPoint.CONTAINER_DESCRIPTOR_CLASS); + String creationElementValidatorClassName = configurationElement.getAttribute(IInvariantRuleExtensionPoint.CREATION_ELEMENT_VALIDATOR_CLASS); + + ConfigurableClassDescriptor configurableClassDescriptor = new ConfigurableClassDescriptor(contributorName, matcherClassName, contributorName, editHelperAdviceClassName, contributorName, containerDescriptorClassName, contributorName, creationElementValidatorClassName); + configurationTypeToClassDescriptor.put(configurationClass, configurableClassDescriptor); + } + + } + + /** + * Creates the {@link IElementMatcher} specific to the given rule configuration + * + * @param ruleConfiguration + * the rule configuration that will configure the created matcher + * @return the {@link IElementMatcher} created or null if none could be created + */ + public IInvariantElementMatcher createMatcher(InvariantRuleConfiguration ruleConfiguration) { + // creates the matcher from the extension points + Class> elementMatcherClass = getMatcherClass(ruleConfiguration); + if(elementMatcherClass == null) { + return null; + } + try { + IInvariantElementMatcher matcher = elementMatcherClass.newInstance(); + if(matcher != null) { + matcher.init(ruleConfiguration); + } + return matcher; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + /** + * @param ruleConfiguration + * @return + */ + public IInvariantContainerDescriptor createContainerDescriptor(InvariantRuleConfiguration ruleConfiguration) { + Class> containerDescriptorClass = getContainerDescriptorClass(ruleConfiguration); + if(containerDescriptorClass == null) { + return null; + } + try { + IInvariantContainerDescriptor containerDescriptor = containerDescriptorClass.newInstance(); + if(containerDescriptor != null) { + containerDescriptor.init(ruleConfiguration); + } + return containerDescriptor; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + /** + * @param ruleConfiguration + * @return + */ + public IInvariantEditHelperAdvice createEditHelperAdvice(InvariantRuleConfiguration ruleConfiguration) { + Class> editHelperAdviceClass = getEditHelperAdviceClass(ruleConfiguration); + if(editHelperAdviceClass == null) { + Activator.log.error("impossible to find the edit helper advice implementation for configuration type : " + ((ruleConfiguration!=null) ? ruleConfiguration.eClass().getName() : "null"), null); + return null; + } + try { + IInvariantEditHelperAdvice editHelperAdvice = editHelperAdviceClass.newInstance(); + if(editHelperAdvice != null) { + editHelperAdvice.init(ruleConfiguration); + } + return editHelperAdvice; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + /** + * @param ruleConfiguration + * @return + */ + public IInvariantCreationElementValidator createCreationElementValidator(InvariantRuleConfiguration ruleConfiguration) { + Class> creationElementValidatorClass = getCreationElementValidatorClass(ruleConfiguration); + if(creationElementValidatorClass == null) { + // Activator.log.error("impossible to find the Creation Element Validator for configuration type : " + ((ruleConfiguration!=null) ? ruleConfiguration.eClass().getName() : "null"), null); + return null; + } + try { + IInvariantCreationElementValidator creationElementValidator = creationElementValidatorClass.newInstance(); + if(creationElementValidator != null) { + creationElementValidator.init(ruleConfiguration); + } + return creationElementValidator; + } catch (InstantiationException e) { + Activator.log.error(e); + } catch (IllegalAccessException e) { + Activator.log.error(e); + } + return null; + } + + + /** + * @param ruleConfiguration + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getCreationElementValidatorClass(InvariantRuleConfiguration configuration) { + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getCreationElementValidatorClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getCreationElementValidatorContributorName(); + + // look in the list of registered matcher for the right one + if(className ==null) { + //Activator.log.error("There should be an implementation class for the configuration "+configurationType+ " from contributor "+contributorName, null); + } else if(contributorName !=null) { + return (Class>)loadClass(className, contributorName); + } + return null; + } + + /** + * @param configurationType + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getMatcherClass(InvariantRuleConfiguration configuration) { + + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getElementMatcherClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getElementMatcherContributorName(); + + // look in the list of registered matcher for the right one + if(className !=null && contributorName !=null) { + return (Class>)loadClass(className, contributorName); + } + return null; + } + + /** + * @param configurationType + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getEditHelperAdviceClass(InvariantRuleConfiguration configuration) { + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getEditHelperAdviceClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getEditHelperAdviceContributorName(); + + // look in the list of registered edit helper advices for the right one + return (Class>)loadClass(className, contributorName); + } + + /** + * @param configurationType + * @return + */ + @SuppressWarnings("unchecked") + protected Class> getContainerDescriptorClass(InvariantRuleConfiguration configuration) { + String configurationType = configuration.eClass().getInstanceClassName(); + String className = configurationTypeToClassDescriptor.get(configurationType).getContainerDescriptorClassName(); + String contributorName = configurationTypeToClassDescriptor.get(configurationType).getContainerDescriptorContributorName(); + + + // look in the list of registered edit helper advices for the right one + if(className !=null && contributorName !=null) { + return (Class>)loadClass(className, contributorName); + } + return null; + } + + protected static class ConfigurableClassDescriptor { + + /** + * @param elementMatcherContributorName + * @param elementMatcherClassName + * @param editHelperAdviceContributorName + * @param editHelperAdviceClassName + * @param containerDescriptorContributorName + * @param containerDescriptorClassName + */ + public ConfigurableClassDescriptor(String elementMatcherContributorName, String elementMatcherClassName, String editHelperAdviceContributorName, String editHelperAdviceClassName, String containerDescriptorContributorName, String containerDescriptorClassName, String creationElementValidatorContributorName, String creationElementValidatorClassName) { + this.elementMatcherContributorName = elementMatcherContributorName; + this.elementMatcherClassName = elementMatcherClassName; + this.editHelperAdviceContributorName = editHelperAdviceContributorName; + this.editHelperAdviceClassName = editHelperAdviceClassName; + this.containerDescriptorContributorName = containerDescriptorContributorName; + this.containerDescriptorClassName = containerDescriptorClassName; + this.creationElementValidatorContributorName = creationElementValidatorContributorName; + this.creationElementValidatorClassName = creationElementValidatorClassName; + } + + private final String elementMatcherContributorName; + + private final String elementMatcherClassName; + + private final String editHelperAdviceContributorName; + + private final String editHelperAdviceClassName; + + private final String containerDescriptorContributorName; + + private final String containerDescriptorClassName; + + private final String creationElementValidatorContributorName; + + private final String creationElementValidatorClassName; + + /** + * @return + */ + public String getCreationElementValidatorContributorName() { + return creationElementValidatorContributorName; + } + + /** + * @return + */ + public String getCreationElementValidatorClassName() { + return creationElementValidatorClassName; + } + + /** + * @return the elementMatcherContributorName + */ + public String getElementMatcherContributorName() { + return elementMatcherContributorName; + } + + + /** + * @return the elementMatcherClassName + */ + public String getElementMatcherClassName() { + return elementMatcherClassName; + } + + + /** + * @return the editHelperAdviceContributorName + */ + public String getEditHelperAdviceContributorName() { + return editHelperAdviceContributorName; + } + + + /** + * @return the editHelperAdviceClassName + */ + public String getEditHelperAdviceClassName() { + return editHelperAdviceClassName; + } + + + /** + * @return the containerDescriptorContributorName + */ + public String getContainerDescriptorContributorName() { + return containerDescriptorContributorName; + } + + + /** + * @return the containerDescriptorClassName + */ + public String getContainerDescriptorClassName() { + return containerDescriptorClassName; + } + + } + + /////////////////////////////////////////////////////////////////////////// + // loading resource + /////////////////////////////////////////////////////////////////////////// + /** A map of classes that have been successfully loaded, keyed on the class name optionally prepended by the plugin ID, if specified. */ + private static Map>> successLookupTable = new HashMap>>(); + + /** A map of classes that could not be loaded, keyed on the class name, optionally prepended by the plugin ID if specified. */ + private static Set failureLookupTable = new HashSet(); + + /** A map to hold the bundle to exception list */ + private static Map> bundleToExceptionsSetMap = new HashMap>(); + + /** + * A utility method to load a class using its name and a given class loader. + * + * @param className + * The class name + * @param bundle + * The class loader + * @return The loaded class or null if could not be loaded + */ + protected static Class loadClass(String className, String pluginId) { + StringBuffer keyStringBuf = new StringBuffer(className.length() + pluginId.length() + 2); // 2 is for . and extra. + keyStringBuf.append(pluginId); + keyStringBuf.append('.'); + keyStringBuf.append(className); + String keyString = keyStringBuf.toString(); + WeakReference> ref = successLookupTable.get(keyString); + Class found = (ref != null) ? ref.get() : null; + if(found == null) { + if(ref != null) + successLookupTable.remove(keyString); + if(!failureLookupTable.contains(keyString)) { + try { + Bundle bundle = basicGetPluginBundle(pluginId); + if(bundle != null) { + // never load the class if the bundle is not active other wise + // we will cause the plugin to load + // unless the class is in the exception list + int state = bundle.getState(); + if(state == org.osgi.framework.Bundle.ACTIVE || isInExceptionList(bundle, className)) { + found = bundle.loadClass(className); + successLookupTable.put(keyString, new WeakReference>(found)); + if(state == org.osgi.framework.Bundle.ACTIVE) { + bundleToExceptionsSetMap.remove(bundle); + } + } + } else { + failureLookupTable.add(keyString); + } + } catch (ClassNotFoundException e) { + failureLookupTable.add(keyString); + } + } + } + return found; + } + + /** + * Given a bundle id, it checks if the bundle is found and activated. If it + * is, the method returns the bundle, otherwise it returns null. + * + * @param pluginId + * the bundle ID + * @return the bundle, if found + */ + protected static Bundle getPluginBundle(String pluginId) { + Bundle bundle = basicGetPluginBundle(pluginId); + if(null != bundle && bundle.getState() == org.osgi.framework.Bundle.ACTIVE) + return bundle; + return null; + } + + private static Bundle basicGetPluginBundle(String pluginId) { + return Platform.getBundle(pluginId); + } + + private static boolean isInExceptionList(Bundle bundle, String className) { + String packageName = className.substring(0, className.lastIndexOf('.')); + Set exceptionSet = bundleToExceptionsSetMap.get(bundle); + if(exceptionSet == null) { + Dictionary dict = bundle.getHeaders(); + String value = dict.get("Eclipse-LazyStart"); //$NON-NLS-1$ + if(value != null) { + int index = value.indexOf("exceptions"); //$NON-NLS-1$ + if(index != -1) { + try { + int start = value.indexOf('"', index + 1); + int end = value.indexOf('"', start + 1); + String exceptions = value.substring(start + 1, end); + exceptionSet = new HashSet(2); + StringTokenizer tokenizer = new StringTokenizer(exceptions, ","); //$NON-NLS-1$ + while(tokenizer.hasMoreTokens()) { + exceptionSet.add(tokenizer.nextToken().trim()); + } + } catch (IndexOutOfBoundsException exception) { + // this means the MF did not follow the documented format for the exceptions list so i'll consider it empty + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + } else { + exceptionSet = Collections.emptySet(); + } + bundleToExceptionsSetMap.put(bundle, exceptionSet); + } + return exceptionSet.contains(packageName); + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java index caccc00c2bf..e02c87e3752 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferences.java @@ -16,6 +16,10 @@ package org.eclipse.papyrus.infra.extendedtypes.preferences; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import java.io.ObjectOutputStream.PutField; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.papyrus.infra.extendedtypes.Activator; @@ -23,7 +27,6 @@ import org.eclipse.ui.IMemento; import org.eclipse.ui.WorkbenchException; import org.eclipse.ui.XMLMemento; - /** * Preferences management for extended types */ @@ -35,6 +38,8 @@ public class ExtendedTypesPreferences { /** id for the node: extended types redefinition */ public final static String EXTENDED_TYPES_REDEFINITION = "extendedTypesRedefinition"; //$NON-NLS-1$ + public static final String EXTENDED_TYPES_SET_WORKSPACE_DEFINITION = "extendedTypeSetsWorkspaceDefinition"; + /** name of the ID attribute */ public final static String ID = "id"; //$NON-NLS-1$ @@ -82,22 +87,17 @@ public class ExtendedTypesPreferences { */ public static IMemento registerLocalRedefinition(String extendedTypesID, String path) { XMLMemento rootMemento = getLocalRedefinitions(); - // try to find an existing local definition for this extendedTypes IMemento memento = getExtendedTypesRedefinitionNode(extendedTypesID); - // if one exists, remove it from the preferences if(memento != null) { unregisterLocalRedefinition(extendedTypesID); } - // then register the new one IMemento newMemento = rootMemento.createChild(EXTENDED_TYPES_REDEFINITION); newMemento.putString(ID, extendedTypesID); newMemento.putString(PATH, path); - saveLocalRedefinitions(rootMemento); - return newMemento; } @@ -121,6 +121,39 @@ public class ExtendedTypesPreferences { return null; } + /** + * Returns the memento associated to the extendedTypes set definition in workspace, or null if none exists + * + * @return the memento found or null if no customization exists for this extendedTypes + */ + protected static IMemento[] getWorkspaceDefinitions() { + XMLMemento rootMemento = getLocalRedefinitions(); + IMemento[] workspaceDefinitions = rootMemento.getChildren(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION); + return workspaceDefinitions; + } + + /** + * Returns the memento associated to the extendedTypes set definition in workspace, or null if none exists + * + * @return the memento found or null if no customization exists for this extendedTypes + */ + protected static IMemento getWorkspaceDefinition(String extendedTypeSetsID) { + if(extendedTypeSetsID == null) { + return null; + } + IMemento[] workspaceDefinitions = getWorkspaceDefinitions(); + if(workspaceDefinitions == null || workspaceDefinitions.length == 0) { + return null; + } + for(IMemento memento : workspaceDefinitions) { + String id = memento.getString(ID); + if(extendedTypeSetsID.equals(id)) { + return memento; + } + } + return null; + } + /** * Returns the path for a given extended type local redefinition * @@ -158,9 +191,33 @@ public class ExtendedTypesPreferences { newRootMemento.putMemento(memento); } } + for(IMemento memento : rootMemento.getChildren(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION)) { + newRootMemento.putMemento(memento); + } // save new Memento saveLocalRedefinitions(newRootMemento); + } + /** + * @param extendedTypesID + */ + public static void unregisterWorkspaceDefinition(String extendedTypesID) { + XMLMemento rootMemento = getLocalRedefinitions(); + // no remove method... + // so, creation of a new root memento, then, duplicate all entries + // except the one to + // delete... + XMLMemento newRootMemento = XMLMemento.createWriteRoot(EXTENDED_TYPES_REDEFINITIONS); + for(IMemento memento : rootMemento.getChildren(EXTENDED_TYPES_REDEFINITION)) { + newRootMemento.putMemento(memento); + } + for(IMemento memento : rootMemento.getChildren(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION)) { + if(!memento.getString(ID).equals(extendedTypesID)) { + newRootMemento.putMemento(memento); + } + } + // save new Memento + saveLocalRedefinitions(newRootMemento); } /** @@ -176,7 +233,6 @@ public class ExtendedTypesPreferences { StringWriter writer = new StringWriter(); try { xmlMemento.save(writer); - if(getPreferenceStore() != null) { getPreferenceStore().setValue(key, writer.toString()); } @@ -194,4 +250,50 @@ public class ExtendedTypesPreferences { public static void saveLocalRedefinitions(XMLMemento rootMemento) { saveMemento(rootMemento, EXTENDED_TYPES_REDEFINITIONS); } + + /** + * Returns all the paths in the workspace that should be an extended type set to load, with the id as a key + * + * @return + */ + public static Map getLocalExtendedTypesDefinitions() { + IMemento[] mementos = getWorkspaceDefinitions(); + if(mementos != null && mementos.length > 0) { + Map idToPath = new HashMap(); + for(IMemento memento : mementos) { + String id = memento.getString(ID); + String path = memento.getString(PATH); + if(id != null && !"".equals(id) && path != null && !"".equals(PATH)) { + idToPath.put(id, path); + } + } + return idToPath; + } + return null; + } + + /** + * Register a new local redefinition of a extendedTypes. + * + * @param extendedTypesID + * the id of the extendedTypes to register + * @param path + * the path to the configuration of the extendedTypes + * @return the memento that has been registered + */ + public static IMemento registerWorkspaceDefinition(String extendedTypesID, String path) { + XMLMemento rootMemento = getLocalRedefinitions(); + // try to find an existing local definition for this extendedTypes + IMemento memento = getWorkspaceDefinition(extendedTypesID); + // if one exists, remove it from the preferences + if(memento != null) { + unregisterWorkspaceDefinition(extendedTypesID); + } + // then register the new one + IMemento newMemento = rootMemento.createChild(EXTENDED_TYPES_SET_WORKSPACE_DEFINITION); + newMemento.putString(ID, extendedTypesID); + newMemento.putString(PATH, path); + saveLocalRedefinitions(rootMemento); + return newMemento; + } } diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/providers/ProviderNotFoundException.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/providers/ProviderNotFoundException.java index 6bf6503f25a..6541bd06a15 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/providers/ProviderNotFoundException.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/providers/ProviderNotFoundException.java @@ -1,36 +1,36 @@ -/***************************************************************************** - * 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.infra.extendedtypes.providers; - -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; - - -/** - * Exception thrown when a provider was not found - */ -public class ProviderNotFoundException extends Exception { - - /** serial UID */ - private static final long serialVersionUID = 8919294410894098831L; - - /** - * Constructor. - * - * @param configuration - * the configuration for which a provider was searched - * - */ - public ProviderNotFoundException(ActionConfiguration configuration) { - super("Provider not found for configuration " + ((configuration != null) ? configuration.getLabel() : "null") + "[" + ((configuration != null) ? configuration.getId() : "null") + "]"); - } - -} +/***************************************************************************** + * 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.infra.extendedtypes.providers; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; + + +/** + * Exception thrown when a provider was not found + */ +public class ProviderNotFoundException extends Exception { + + /** serial UID */ + private static final long serialVersionUID = 8919294410894098831L; + + /** + * Constructor. + * + * @param configuration + * the configuration for which a provider was searched + * + */ + public ProviderNotFoundException(ActionConfiguration configuration) { + super(); + } + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/semantic/ISemanticTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/semantic/ISemanticTypeFactory.java new file mode 100644 index 00000000000..4c2edf960db --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/semantic/ISemanticTypeFactory.java @@ -0,0 +1,23 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.semantic; + +import org.eclipse.gmf.runtime.emf.type.core.IElementType; + +/** + * Interface that must be implemented by each factory relying on the semanticTypeFactory extension point. + */ +public interface ISemanticTypeFactory { + + /** creates the element type from the given configuration */ + IElementType createElementType(); +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedElementType.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedElementType.java new file mode 100644 index 00000000000..caa71d405a6 --- /dev/null +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedElementType.java @@ -0,0 +1,71 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.extendedtypes.types; + +import java.net.URL; + +import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor; +import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.SpecializationType; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator; + + +/** + * @author RS211865 + */ +public class ExtendedHintedElementType extends SpecializationType implements IExtendedHintedElementType { + + private String semanticHint; + + protected ICreationElementValidator creationElementValidator; + + /** + * @param id + * @param iconURL + * @param displayName + * @param elementTypes + * @param matcher + * @param descriptor + * @param editHelperAdvice + * @param iElementCreationValidator + */ + public ExtendedHintedElementType(String id, URL iconURL, String displayName, IElementType[] elementTypes, IElementMatcher matcher, IContainerDescriptor descriptor, IEditHelperAdvice editHelperAdvice, String semanticHint, ICreationElementValidator creationElementValidator) { + super(id, iconURL, displayName, elementTypes, matcher, descriptor, editHelperAdvice); + this.semanticHint = semanticHint; + this.creationElementValidator = creationElementValidator; + } + + /** + * Gets the semantic hint. + */ + public String getSemanticHint() { + return semanticHint; + } + + /** + * {@inheritDoc} + */ + public ICreationElementValidator getElementCreationValidator() { + return creationElementValidator; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "Extended Type: "+getDisplayName()+" ["+getId()+"]"; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java deleted file mode 100644 index 8c20fdcb626..00000000000 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/ExtendedHintedTypeFactory.java +++ /dev/null @@ -1,125 +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.infra.extendedtypes.types; - -import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeFactory; -import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; -import org.eclipse.gmf.runtime.emf.type.core.ISpecializationTypeDescriptor; -import org.eclipse.gmf.runtime.emf.type.core.SpecializationType; -import org.eclipse.gmf.runtime.emf.type.core.internal.impl.HintedTypeFactory; -import org.eclipse.papyrus.infra.extendedtypes.Activator; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedSemanticTypeDescriptor; - - -/** - * Factory for ExtendedHintedType elements - */ -public class ExtendedHintedTypeFactory extends AbstractElementTypeFactory { - - /** - * The hinted type kind. This string is specified in the XML 'kind' - * attribute of any element type that is a hinted type. - */ - public static final String HINTED_TYPE_KIND = "org.eclipse.gmf.runtime.emf.core.internal.util.IHintedType"; //$NON-NLS-1$ - - /** - * The semantic hint parameter name. - */ - public static final String SEMANTIC_HINT_PARAM_NAME = "semanticHint"; //$NON-NLS-1$ - - /** singleton instance of this factory */ - private static ExtendedHintedTypeFactory instance; - - /** - * Returns the singleton instance of this factory. - * - * @return the singleton instance of this factory. - */ - public synchronized static ExtendedHintedTypeFactory getInstance() { - if(instance == null) { - instance = new ExtendedHintedTypeFactory(); - } - return instance; - } - - /** - * Private Constructor. - * - */ - private ExtendedHintedTypeFactory() { - - } - - /** - * The extended hinted specialization type class. - */ - private static final class ExtendedHintedSpecializationType extends SpecializationType implements IExtendedHintedElementType { - - /** The semantic hint */ - private final String semanticHint; - - /** element type configuration */ - private final ExtendedElementTypeConfiguration configuration; - - /** - * Constructs a new hinted type. - * - * @param descriptor - * the specialization type descriptor - * @param semanticHint - * the semantic hint - */ - public ExtendedHintedSpecializationType(ISpecializationTypeDescriptor descriptor, String semanticHint, ExtendedElementTypeConfiguration configuration) { - super(descriptor); - this.semanticHint = semanticHint; - this.configuration = configuration; - } - - /** - * Gets the semantic hint. - */ - public String getSemanticHint() { - return semanticHint; - } - - /** - * {@inheritDoc} - */ - public ExtendedElementTypeConfiguration getConfiguration() { - return configuration; - } - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("restriction") - @Override - public ISpecializationType createSpecializationType(ISpecializationTypeDescriptor descriptor) { - - String semanticHint = descriptor.getParamValue(SEMANTIC_HINT_PARAM_NAME); - - if(descriptor instanceof ExtendedSemanticTypeDescriptor) { - ExtendedElementTypeConfiguration configuration = ((ExtendedSemanticTypeDescriptor)descriptor).getConfiguration(); - return new ExtendedHintedSpecializationType(descriptor, semanticHint, configuration); - } - - // used default factory. Should never happen - Activator.log.warn("The Extended type factory should never use HintedTypeFactory from GMF"); - return new HintedTypeFactory().createSpecializationType(descriptor); - } - - -} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/IExtendedHintedElementType.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/IExtendedHintedElementType.java index 39afa41a5bc..ef908045961 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/IExtendedHintedElementType.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/types/IExtendedHintedElementType.java @@ -1,31 +1,25 @@ -/***************************************************************************** - * 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.infra.extendedtypes.types; - -import org.eclipse.gmf.runtime.emf.type.core.IHintedType; -import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; - - -/** - * Element Type that contains a configuration for extensions (Pre/Post actions and validation) - */ -public interface IExtendedHintedElementType extends ISpecializationType, IHintedType { - - /** - * Returns the Element Type configuration associated to the element type. - * @return the Element Type configuration associated to the element type. - */ - public ExtendedElementTypeConfiguration getConfiguration(); -} +/***************************************************************************** + * 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.infra.extendedtypes.types; + +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; +import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; + + +/** + * interface implemented by all configurable element types specializations + */ +public interface IExtendedHintedElementType extends ISpecializationType, IHintedType { + +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/util/ElementTypeUtils.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/util/ElementTypeUtils.java index c6e090d9f0b..9ff0c46869f 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/util/ElementTypeUtils.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/util/ElementTypeUtils.java @@ -1,188 +1,183 @@ -/***************************************************************************** - * 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.infra.extendedtypes.util; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.IMetamodelType; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PreActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * Utility class for {@link IElementType}. - */ -public class ElementTypeUtils { - - /** - * Tests if two elements types are equivalent - * - * @param referenceType - * the reference type for the comparison - * @param typeToCompare - * the type that is compared to the reference one - * @return true if both types are equivalent semantically - */ - public static boolean isSemanticallyEquivalent(IElementType referenceType, IElementType typeToCompare) { - boolean isEquivalent = true; - // first : easy test... - if(typeToCompare.equals(referenceType)) { - return true; - } - // 2. test the kind of element. - if(referenceType instanceof IMetamodelType) { - if(!(typeToCompare instanceof IMetamodelType)) { - return false; - } else { - EClass referenceEclass = ((IMetamodelType)referenceType).getEClass(); - EClass eclassToCompare = ((IMetamodelType)typeToCompare).getEClass(); - isEquivalent = isEquivalent && referenceEclass.equals(eclassToCompare); - } - } else { - if((typeToCompare instanceof IMetamodelType)) { - return false; - } - } - // metaclasses are equivalent. check for extended types now... - if(referenceType instanceof IExtendedHintedElementType) { - if(typeToCompare instanceof IExtendedHintedElementType) { - isEquivalent = isEquivalent && isSemanticallyEquivalent((IExtendedHintedElementType)referenceType, (IExtendedHintedElementType)typeToCompare); - } - } - return isEquivalent; - } - - /** - * Tests if two elements types are equivalent (configuration) - * - * @param referenceType - * the reference type for the comparison - * @param typeToCompare - * the type that is compared to the reference one - * @return true if both types are equivalent semantically - */ - public static boolean isSemanticallyEquivalent(IExtendedHintedElementType referenceType, IExtendedHintedElementType typeToCompare) { - boolean isEquivalent = true; - // check all pre/post action and validation - ExtendedElementTypeConfiguration referenceConfiguration = referenceType.getConfiguration(); - ExtendedElementTypeConfiguration configurationToCompare = typeToCompare.getConfiguration(); - List referencePrevalidation = referenceConfiguration.getPreValidation(); - List prevalidationToCompare = configurationToCompare.getPreValidation(); - if(referencePrevalidation != null) { - isEquivalent = isEquivalent && isEquivalent(referencePrevalidation, prevalidationToCompare); - } else if(prevalidationToCompare != null) { - isEquivalent = false; - } - List referencePreaction = referenceConfiguration.getPreAction(); - List preactionToCompare = configurationToCompare.getPreAction(); - if(referencePreaction != null) { - isEquivalent = isEquivalent && isEquivalent(referencePreaction, preactionToCompare); - } else if(preactionToCompare != null) { - isEquivalent = false; - } - List referencePostaction = referenceConfiguration.getPostAction(); - List postactionToCompare = configurationToCompare.getPostAction(); - if(referencePostaction != null) { - isEquivalent = isEquivalent && isEquivalent(referencePostaction, postactionToCompare); - } else if(postactionToCompare != null) { - isEquivalent = false; - } - return isEquivalent; - } - - public static boolean isEquivalent(List referenceList, List listToCompare) { - boolean isEquivalent = true; - if(referenceList == null) { - // only one is null : false - if(listToCompare != null) { - return false; - } else { - // both are null: true - return true; - } - } else { - // only one is null: false - if(listToCompare == null) { - return false; - } - } - // check emptyness. If both empty : equivalent - if(referenceList.isEmpty() && listToCompare.isEmpty()) { - return true; - } - // check size. If different, false - if(referenceList.size() != listToCompare.size()) { - return false; - } - for(int i = 0; i < referenceList.size(); i++) { - EObject reference = referenceList.get(i); - EObject compared = listToCompare.get(i); - isEquivalent = isEquivalent && EcoreUtil.equals(reference, compared); - } - return isEquivalent; - } - - /** - * Returns the closest non Extended element type for a given extended type - * - * @param requestElementType - * the element type to study - * @return the closest non extended element type or null if none was found. - */ - public static IElementType findClosestNonExtendedElementType(IExtendedHintedElementType requestElementType) { - List superTypes = new ArrayList(Arrays.asList(requestElementType.getAllSuperTypes())); - // reverse order for the list, because super type returns all super types from furthest to closest, we want the other order - Collections.reverse(superTypes); - for(IElementType superType : superTypes) { - if(!(superType instanceof IExtendedHintedElementType)) { - return superType; - } - } - return null; - } - - /** - * Returns the closest super type which is not an extended type - * - * @param elementType - * the element type for which the super type is searched. - * @return the closest super type non extended or null if none was found - */ - public static IElementType getClosestDiagramType(IElementType elementType) { - if(!(elementType instanceof IExtendedHintedElementType)) { - return elementType; - } - // this is an extended type - String diagramElementTypeID = ((IExtendedHintedElementType)elementType).getConfiguration().getSpecializedDiagramTypeID(); - if(diagramElementTypeID != null) { - return getClosestDiagramType(ElementTypeRegistry.getInstance().getType(diagramElementTypeID)); - } else { - IElementType[] superTypes = elementType.getAllSuperTypes(); - if(superTypes.length > 1) { - return getClosestDiagramType(superTypes[superTypes.length - 1]); - } - } - return null; - } -} +/***************************************************************************** + * 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.infra.extendedtypes.util; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.IMetamodelType; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; + +/** + * Utility class for {@link IElementType}. + */ +public class ElementTypeUtils { + + /** + * Tests if two elements types are equivalent + * + * @param referenceType + * the reference type for the comparison + * @param typeToCompare + * the type that is compared to the reference one + * @return true if both types are equivalent semantically + */ + public static boolean isSemanticallyEquivalent(IElementType referenceType, IElementType typeToCompare) { + boolean isEquivalent = true; + // first : easy test... + if(typeToCompare.equals(referenceType)) { + return true; + } + // 2. test the kind of element. + if(referenceType instanceof IMetamodelType) { + if(!(typeToCompare instanceof IMetamodelType)) { + return false; + } else { + EClass referenceEclass = ((IMetamodelType)referenceType).getEClass(); + EClass eclassToCompare = ((IMetamodelType)typeToCompare).getEClass(); + isEquivalent = isEquivalent && referenceEclass.equals(eclassToCompare); + } + } else { + if((typeToCompare instanceof IMetamodelType)) { + return false; + } + } + // metaclasses are equivalent. check for extended types now... + if(referenceType instanceof IExtendedHintedElementType) { + if(typeToCompare instanceof IExtendedHintedElementType) { + isEquivalent = isEquivalent && isSemanticallyEquivalent((IExtendedHintedElementType)referenceType, (IExtendedHintedElementType)typeToCompare); + } + } + return isEquivalent; + } + + /** + * Tests if two elements types are equivalent (configuration) + * + * @param referenceType + * the reference type for the comparison + * @param typeToCompare + * the type that is compared to the reference one + * @return true if both types are equivalent semantically + */ + public static boolean isSemanticallyEquivalent(IExtendedHintedElementType referenceType, IExtendedHintedElementType typeToCompare) { + boolean isEquivalent = true; + // check all pre/post action and validation +// ExtendedElementTypeConfiguration referenceConfiguration = referenceType.getConfiguration(); +// ExtendedElementTypeConfiguration configurationToCompare = typeToCompare.getConfiguration(); +// List referencePrevalidation = referenceConfiguration.getPreValidation(); +// List prevalidationToCompare = configurationToCompare.getPreValidation(); +// if(referencePrevalidation != null) { +// isEquivalent = isEquivalent && isEquivalent(referencePrevalidation, prevalidationToCompare); +// } else if(prevalidationToCompare != null) { +// isEquivalent = false; +// } +// List referencePreaction = referenceConfiguration.getPreAction(); +// List preactionToCompare = configurationToCompare.getPreAction(); +// if(referencePreaction != null) { +// isEquivalent = isEquivalent && isEquivalent(referencePreaction, preactionToCompare); +// } else if(preactionToCompare != null) { +// isEquivalent = false; +// } +// List referencePostaction = referenceConfiguration.getPostAction(); +// List postactionToCompare = configurationToCompare.getPostAction(); +// if(referencePostaction != null) { +// isEquivalent = isEquivalent && isEquivalent(referencePostaction, postactionToCompare); +// } else if(postactionToCompare != null) { +// isEquivalent = false; +// } + return isEquivalent; + } + + public static boolean isEquivalent(List referenceList, List listToCompare) { + boolean isEquivalent = true; + if(referenceList == null) { + // only one is null : false + if(listToCompare != null) { + return false; + } else { + // both are null: true + return true; + } + } else { + // only one is null: false + if(listToCompare == null) { + return false; + } + } + // check emptyness. If both empty : equivalent + if(referenceList.isEmpty() && listToCompare.isEmpty()) { + return true; + } + // check size. If different, false + if(referenceList.size() != listToCompare.size()) { + return false; + } + for(int i = 0; i < referenceList.size(); i++) { + EObject reference = referenceList.get(i); + EObject compared = listToCompare.get(i); + isEquivalent = isEquivalent && EcoreUtil.equals(reference, compared); + } + return isEquivalent; + } + + /** + * Returns the closest non Extended element type for a given extended type + * + * @param requestElementType + * the element type to study + * @return the closest non extended element type or null if none was found. + */ + public static IElementType findClosestNonExtendedElementType(IExtendedHintedElementType requestElementType) { + List superTypes = new ArrayList(Arrays.asList(requestElementType.getAllSuperTypes())); + // reverse order for the list, because super type returns all super types from furthest to closest, we want the other order + Collections.reverse(superTypes); + for(IElementType superType : superTypes) { + if(!(superType instanceof IExtendedHintedElementType)) { + return superType; + } + } + return null; + } + + /** + * Returns the closest super type which is not an extended type + * + * @param elementType + * the element type for which the super type is searched. + * @return the closest super type non extended or null if none was found + */ + public static IElementType getClosestDiagramType(IElementType elementType) { + if(!(elementType instanceof IExtendedHintedElementType)) { + return elementType; + } +// // this is an extended type +// String diagramElementTypeID = ((IExtendedHintedElementType)elementType).getSpecializedTypeIds(); +// if(diagramElementTypeID != null) { +// return getClosestDiagramType(ElementTypeRegistry.getInstance().getType(diagramElementTypeID)); +// } else { +// IElementType[] superTypes = elementType.getAllSuperTypes(); +// if(superTypes.length > 1) { +// return getClosestDiagramType(superTypes[superTypes.length - 1]); +// } +// } + return null; + } +} diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF index 079af80d234..dd0d850549f 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF +++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF @@ -1,28 +1,30 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.papyrus.infra.newchild;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Activator: org.eclipse.papyrus.infra.newchild.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.emf;bundle-version="2.6.0", - org.eclipse.emf.ecore, - org.eclipse.osgi, - org.eclipse.emf.ecore.xmi, - org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0", - org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0", - org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.0.0", - org.eclipse.emf.transaction, - org.eclipse.gmf.runtime.emf.type.core, - org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -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 -Bundle-ActivationPolicy: lazy -Bundle-Vendor: %providerName -Bundle-Localization: plugin +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.emf;bundle-version="2.6.0", + org.eclipse.emf.ecore, + org.eclipse.osgi, + org.eclipse.emf.ecore.xmi, + org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0";visibility:=reexport, + org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0";visibility:=reexport, + org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.0.0", + org.eclipse.emf.transaction, + org.eclipse.gmf.runtime.emf.type.core, + org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0" +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 +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 1.0.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-Activator: org.eclipse.papyrus.infra.newchild.Activator +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.newchild;singleton:=tru + e +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java b/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java index 8ed37a10f26..d278a9feb26 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java +++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java @@ -1,323 +1,323 @@ -/***************************************************************************** - * Copyright (c) 2011 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: - * - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.infra.newchild; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Iterator; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.command.UnexecutableCommand; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel.CreationMenu; -import org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel.Folder; -import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; -import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.MenuItem; - -/** - * this class contains code to construct menu from a Menu and a selected object - * - */ -public class CreationMenuFactory { - private TransactionalEditingDomain editingDomain; - - /** - * - * Constructor. - * - * @param editingDomain - */ - public CreationMenuFactory(TransactionalEditingDomain editingDomain) { - super(); - this.editingDomain = editingDomain; - } - - /** - * construct a menu from a folder, this is a recursion - * @param menu the current menu - * @param folder the folder - * @param selectedObject the current selection - * @return true if sub-menu has been added - */ - public boolean populateMenu(Menu menu, Folder folder, EObject selectedObject){ - if(selectedObject!=null){ - org.eclipse.swt.widgets.MenuItem topMenuItem = new MenuItem(menu,SWT.CASCADE ); - topMenuItem.setText(folder.getLabel()); - if(folder.getIcon()!=null){ - URL url; - try { - url = new URL(folder.getIcon()); - ImageDescriptor imgDesc=ImageDescriptor.createFromURL(url); - topMenuItem.setImage(imgDesc.createImage()); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - Menu topMenu=new Menu(menu); - topMenuItem.setMenu(topMenu); - boolean oneDisplayedMenu=false; - for(org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel.Menu currentMenu : folder.getMenu()) { - boolean result=false; - if( currentMenu instanceof Folder){ - result=populateMenu(topMenu, (Folder) currentMenu, selectedObject); - - - } - - if( currentMenu instanceof CreationMenu){ - CreationMenu currentCreationMenu=(CreationMenu)currentMenu; - EReference reference=null; - String role=currentCreationMenu.getRole(); - //the role is precised - if( role!=null){ - EStructuralFeature feature= selectedObject.eClass().getEStructuralFeature(role); - if( feature instanceof EReference){ - reference=(EReference)feature; - result =constructMenu(selectedObject, topMenu, currentCreationMenu, reference); - } - } - else{//no precisison - //test if all roles must be displayed - if(currentCreationMenu.isDisplayAllRoles()){ - result = constructMenu(selectedObject, topMenu, currentCreationMenu); - } - else{ - - result = constructMenu(selectedObject, topMenu, currentCreationMenu, reference); - } - } - } - if(result){ - oneDisplayedMenu=true; - } - } - if(!oneDisplayedMenu){ - topMenuItem.dispose(); - } - return oneDisplayedMenu; - - } - return false; - - } - - - /** - * create menu by displaying if possible different roles - * @param selectedObject the current object - * @param menu the current menu in creation - * @param currentCreationMenu - * @return true if sub-menu has been created - */ - protected boolean constructMenu(EObject selectedObject, Menu menu, CreationMenu currentCreationMenu) { - //find the feature between children and owner - ArrayList possibleEFeatures = getEreferences(selectedObject, currentCreationMenu); - - if(possibleEFeatures.size()==1){ - Command cmd=buildCommand(null, selectedObject, currentCreationMenu.getElementTypeIdRef()); - if( cmd.canExecute()){ - MenuItem item = new MenuItem(menu, SWT.NONE); - fillIcon(currentCreationMenu, item); - item.setEnabled(true); - item.setText(currentCreationMenu.getLabel()); - item.addSelectionListener(new CreationMenuListener(cmd, editingDomain)); - return true; - } - return false; - } - else if(possibleEFeatures.size()>1){ - org.eclipse.swt.widgets.MenuItem topMenuItem = new MenuItem(menu,SWT.CASCADE ); - topMenuItem.setText(currentCreationMenu.getLabel()); - Menu topMenu=new Menu(menu); - topMenuItem.setMenu(topMenu); - for(EStructuralFeature eStructuralFeature : possibleEFeatures) { - - Command cmd=buildCommand((EReference)eStructuralFeature, selectedObject, currentCreationMenu.getElementTypeIdRef()); - if( cmd.canExecute()){ - MenuItem item = new MenuItem(topMenu, SWT.NONE); - fillIcon(currentCreationMenu, item); - item.setEnabled(true); - item.setText("As "+eStructuralFeature.getName()); - item.addSelectionListener(new CreationMenuListener(cmd, editingDomain)); - } - - } - if(topMenu.getItemCount()==0){ - topMenu.dispose(); - return false; - } - else{ - return true; - } - } - else{ - return false; - } - } - /** - * display an icon from a specified url or from Element type - * @param currentCreationMenu - * @param item - */ - protected void fillIcon(CreationMenu currentCreationMenu, MenuItem item) { - if(currentCreationMenu.getIcon()!=null){ - URL url; - try { - url = new URL(currentCreationMenu.getIcon()); - ImageDescriptor imgDesc=ImageDescriptor.createFromURL(url); - item.setImage(imgDesc.createImage()); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - }else{ - createIconFromElementType(currentCreationMenu, item); - } - } - /** - * it is used in order calculate all roles that can play an element to another - * @param selectedObject - * @param currentCreationMenu - * @return return the list of Ereference that can be calculated - */ - protected ArrayList getEreferences(EObject selectedObject, CreationMenu currentCreationMenu) { - ArrayList possibleEFeatures = new ArrayList(); - EList featureList = selectedObject.eClass().getEAllStructuralFeatures(); - Iterator iterator = featureList.iterator(); - while(iterator.hasNext()) { - EStructuralFeature eStructuralFeature = iterator.next(); - if(eStructuralFeature instanceof EReference) { - EReference ref = (EReference)eStructuralFeature; - if(ref.isContainment()) { - if(isSubClass(ref.getEType(), getElementType(currentCreationMenu.getElementTypeIdRef()).getEClass())) { - possibleEFeatures.add(eStructuralFeature); - } - } - } - } - return possibleEFeatures; - } - - /** - * Test if a possibleSub eclass is a sub eclass - * - * @param aclass - * , cannot be null - * @param possibleSubClasse - * , cannot be null - * @return true if possible eclass is a subtype of a eclass or false - */ - protected boolean isSubClass(EClassifier aclass, EClass possibleSubClasse) { - if(aclass.equals(possibleSubClasse)) { - return true; - } - EList superTypeList = possibleSubClasse.getEAllSuperTypes(); - if(superTypeList.contains(aclass)) { - return true; - } - return false; - } - - - /** - * associate the icon from the element type - * @param currentCreationMenu - * @param item the current menu - */ - protected void createIconFromElementType(CreationMenu currentCreationMenu, MenuItem item) { - if(getElementType(currentCreationMenu.getElementTypeIdRef()).getIconURL()!=null){ - ImageDescriptor imgDesc=ImageDescriptor.createFromURL(getElementType(currentCreationMenu.getElementTypeIdRef()).getIconURL()); - item.setImage(imgDesc.createImage()); - } - } - - /** - * create a submenu - * @param selectedObject the selected object - * @param topMenu the menu when will add menus - * @param currentCreationMenu - * @param reference the role of the new element - * @return true if the menu can be created - */ - protected boolean constructMenu(EObject selectedObject, Menu topMenu, CreationMenu currentCreationMenu, EReference reference) { - boolean oneDisplayedMenu=false; - Command cmd=buildCommand(reference, selectedObject, currentCreationMenu.getElementTypeIdRef()); - if( cmd.canExecute()){ - oneDisplayedMenu=true; - MenuItem item = new MenuItem(topMenu, SWT.NONE); - fillIcon(currentCreationMenu, item); - item.setEnabled(true); - item.setText(currentCreationMenu.getLabel()); - item.addSelectionListener(new CreationMenuListener(cmd, editingDomain)); - } - return oneDisplayedMenu; - } - - /** - * get the IelementType from a string - * @param extendedType the string that represents the element type - * @return the element type or null - */ - protected IElementType getElementType(String extendedType){ - return ElementTypeRegistry.getInstance().getType(extendedType); - } - /** - * Construct a command of creation - * @param reference the role of the element that will be created (maybe null) - * @param container the container of the created elements - * @param extendedType the extended type of the created element - * @return a command that can be executed by the domain - */ - protected Command buildCommand(EReference reference, EObject container, String extendedType) { - - - IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container); - if(provider == null) { - return UnexecutableCommand.INSTANCE; - } - - ICommand createGMFCommand = provider.getEditCommand(buildRequest(reference, container, extendedType)); - if(createGMFCommand != null) { - Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } - /** - * - * @return - * the creation request to use in this handler - */ - protected CreateElementRequest buildRequest(EReference reference, EObject container, String extendedType) { - if(reference==null){ - return new CreateElementRequest(editingDomain, container, getElementType(extendedType)) ; - } - return new CreateElementRequest(editingDomain, container, getElementType(extendedType), reference); - } -} - +/***************************************************************************** + * Copyright (c) 2011 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: + * + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.newchild; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Iterator; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.UnexecutableCommand; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel.CreationMenu; +import org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel.Folder; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.MenuItem; + +/** + * this class contains code to construct menu from a Menu and a selected object + * + */ +public class CreationMenuFactory { + private TransactionalEditingDomain editingDomain; + + /** + * + * Constructor. + * + * @param editingDomain + */ + public CreationMenuFactory(TransactionalEditingDomain editingDomain) { + super(); + this.editingDomain = editingDomain; + } + + /** + * construct a menu from a folder, this is a recursion + * @param menu the current menu + * @param folder the folder + * @param selectedObject the current selection + * @return true if sub-menu has been added + */ + public boolean populateMenu(Menu menu, Folder folder, EObject selectedObject){ + if(selectedObject!=null && folder!=null){ + org.eclipse.swt.widgets.MenuItem topMenuItem = new MenuItem(menu,SWT.CASCADE ); + topMenuItem.setText(folder.getLabel()); + if(folder.getIcon()!=null){ + URL url; + try { + url = new URL(folder.getIcon()); + ImageDescriptor imgDesc=ImageDescriptor.createFromURL(url); + topMenuItem.setImage(imgDesc.createImage()); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + Menu topMenu=new Menu(menu); + topMenuItem.setMenu(topMenu); + boolean oneDisplayedMenu=false; + for(org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel.Menu currentMenu : folder.getMenu()) { + boolean result=false; + if( currentMenu instanceof Folder){ + result=populateMenu(topMenu, (Folder) currentMenu, selectedObject); + + + } + + if( currentMenu instanceof CreationMenu){ + CreationMenu currentCreationMenu=(CreationMenu)currentMenu; + EReference reference=null; + String role=currentCreationMenu.getRole(); + //the role is precised + if( role!=null){ + EStructuralFeature feature= selectedObject.eClass().getEStructuralFeature(role); + if( feature instanceof EReference){ + reference=(EReference)feature; + result =constructMenu(selectedObject, topMenu, currentCreationMenu, reference); + } + } + else{//no precisison + //test if all roles must be displayed + if(currentCreationMenu.isDisplayAllRoles()){ + result = constructMenu(selectedObject, topMenu, currentCreationMenu); + } + else{ + + result = constructMenu(selectedObject, topMenu, currentCreationMenu, reference); + } + } + } + if(result){ + oneDisplayedMenu=true; + } + } + if(!oneDisplayedMenu){ + topMenuItem.dispose(); + } + return oneDisplayedMenu; + + } + return false; + + } + + /** + * create menu by displaying if possible different roles + * @param selectedObject the current object + * @param menu the current menu in creation + * @param currentCreationMenu + * @return true if sub-menu has been created + */ + protected boolean constructMenu(EObject selectedObject, Menu menu, CreationMenu currentCreationMenu) { + //find the feature between children and owner + ArrayList possibleEFeatures = getEreferences(selectedObject, currentCreationMenu); + + if(possibleEFeatures.size()==1){ + Command cmd=buildCommand(null, selectedObject, currentCreationMenu.getElementTypeIdRef()); + if( cmd.canExecute()){ + MenuItem item = new MenuItem(menu, SWT.NONE); + fillIcon(currentCreationMenu, item); + item.setEnabled(true); + item.setText(currentCreationMenu.getLabel()); + item.addSelectionListener(new CreationMenuListener(cmd, editingDomain)); + return true; + } + return false; + } + else if(possibleEFeatures.size()>1){ + org.eclipse.swt.widgets.MenuItem topMenuItem = new MenuItem(menu,SWT.CASCADE ); + topMenuItem.setText(currentCreationMenu.getLabel()); + Menu topMenu=new Menu(menu); + topMenuItem.setMenu(topMenu); + for(EStructuralFeature eStructuralFeature : possibleEFeatures) { + + Command cmd=buildCommand((EReference)eStructuralFeature, selectedObject, currentCreationMenu.getElementTypeIdRef()); + if( cmd.canExecute()){ + MenuItem item = new MenuItem(topMenu, SWT.NONE); + fillIcon(currentCreationMenu, item); + item.setEnabled(true); + item.setText("As "+eStructuralFeature.getName()); + item.addSelectionListener(new CreationMenuListener(cmd, editingDomain)); + } + + } + if(topMenu.getItemCount()==0){ + topMenu.dispose(); + return false; + } + else{ + return true; + } + } + else{ + return false; + } + } + /** + * display an icon from a specified url or from Element type + * @param currentCreationMenu + * @param item + */ + protected void fillIcon(CreationMenu currentCreationMenu, MenuItem item) { + if(currentCreationMenu.getIcon()!=null && !"".equals(currentCreationMenu.getIcon())){ + URL url; + try { + url = new URL(currentCreationMenu.getIcon()); + ImageDescriptor imgDesc=ImageDescriptor.createFromURL(url); + item.setImage(imgDesc.createImage()); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + }else{ + createIconFromElementType(currentCreationMenu, item); + } + } + /** + * it is used in order calculate all roles that can play an element to another + * @param selectedObject + * @param currentCreationMenu + * @return return the list of Ereference that can be calculated + */ + protected ArrayList getEreferences(EObject selectedObject, CreationMenu currentCreationMenu) { + ArrayList possibleEFeatures = new ArrayList(); + EList featureList = selectedObject.eClass().getEAllStructuralFeatures(); + Iterator iterator = featureList.iterator(); + while(iterator.hasNext()) { + EStructuralFeature eStructuralFeature = iterator.next(); + if(eStructuralFeature instanceof EReference) { + EReference ref = (EReference)eStructuralFeature; + if(ref.isContainment()) { + IElementType menuType = getElementType(currentCreationMenu.getElementTypeIdRef()); + if(menuType!=null && isSubClass(ref.getEType(), menuType.getEClass())) { + possibleEFeatures.add(eStructuralFeature); + } + } + } + } + return possibleEFeatures; + } + + /** + * Test if a possibleSub eclass is a sub eclass + * + * @param aclass + * , cannot be null + * @param possibleSubClasse + * , cannot be null + * @return true if possible eclass is a subtype of a eclass or false + */ + protected boolean isSubClass(EClassifier aclass, EClass possibleSubClasse) { + if(aclass.equals(possibleSubClasse)) { + return true; + } + EList superTypeList = possibleSubClasse.getEAllSuperTypes(); + if(superTypeList.contains(aclass)) { + return true; + } + return false; + } + + + /** + * associate the icon from the element type + * @param currentCreationMenu + * @param item the current menu + */ + protected void createIconFromElementType(CreationMenu currentCreationMenu, MenuItem item) { + if(getElementType(currentCreationMenu.getElementTypeIdRef()).getIconURL()!=null){ + ImageDescriptor imgDesc=ImageDescriptor.createFromURL(getElementType(currentCreationMenu.getElementTypeIdRef()).getIconURL()); + item.setImage(imgDesc.createImage()); + } + } + + /** + * create a submenu + * @param selectedObject the selected object + * @param topMenu the menu when will add menus + * @param currentCreationMenu + * @param reference the role of the new element + * @return true if the menu can be created + */ + protected boolean constructMenu(EObject selectedObject, Menu topMenu, CreationMenu currentCreationMenu, EReference reference) { + boolean oneDisplayedMenu=false; + Command cmd=buildCommand(reference, selectedObject, currentCreationMenu.getElementTypeIdRef()); + if( cmd.canExecute()){ + oneDisplayedMenu=true; + MenuItem item = new MenuItem(topMenu, SWT.NONE); + fillIcon(currentCreationMenu, item); + item.setEnabled(true); + item.setText(currentCreationMenu.getLabel()); + item.addSelectionListener(new CreationMenuListener(cmd, editingDomain)); + } + return oneDisplayedMenu; + } + + /** + * get the IelementType from a string + * @param extendedType the string that represents the element type + * @return the element type or null + */ + protected IElementType getElementType(String extendedType){ + return ElementTypeRegistry.getInstance().getType(extendedType); + } + /** + * Construct a command of creation + * @param reference the role of the element that will be created (maybe null) + * @param container the container of the created elements + * @param extendedType the extended type of the created element + * @return a command that can be executed by the domain + */ + protected Command buildCommand(EReference reference, EObject container, String extendedType) { + + + IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container); + if(provider == null) { + return UnexecutableCommand.INSTANCE; + } + + ICommand createGMFCommand = provider.getEditCommand(buildRequest(reference, container, extendedType)); + if(createGMFCommand != null) { + Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); + return emfCommand; + } + return UnexecutableCommand.INSTANCE; + } + /** + * + * @return + * the creation request to use in this handler + */ + protected CreateElementRequest buildRequest(EReference reference, EObject container, String extendedType) { + if(reference==null){ + return new CreateElementRequest(editingDomain, container, getElementType(extendedType)) ; + } + return new CreateElementRequest(editingDomain, container, getElementType(extendedType), reference); + } +} + diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF index 8e5e8926f68..18ebbc24aa4 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF @@ -33,7 +33,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.2.0", org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0", org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0", - org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0" + org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0", + org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0" Export-Package: org.eclipse.papyrus.gmf.diagram.common.commands, org.eclipse.papyrus.gmf.diagram.common.compatibility, org.eclipse.papyrus.gmf.diagram.common.edit.part, diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen index 6e4c076486d..3647f0c6967 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen @@ -1,139 +1,139 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen index 15afc95b0d2..e8a6a185845 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen @@ -1,87 +1,87 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java index 3574d5bf156..811efd555bb 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java @@ -13,10 +13,16 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; +import org.eclipse.papyrus.sysml.blocks.Block; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -31,7 +37,17 @@ public class BlockCompositeSemanticEditPolicy extends CompartmentSemanticEditPol @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) { + baseType = SysMLElementTypes.FLOW_PORT_NA; + } + } + + if(SysMLElementTypes.FLOW_PORT_NA == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory()); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java index 109620e6292..7bacaff00ba 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java @@ -13,11 +13,16 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -42,18 +47,39 @@ public class BlockPropertyCompositeSemanticEditPolicy extends DefaultSemanticEdi if ((eObject != null) && (eObject instanceof Property)) { Type type = ((Property) eObject).getType(); if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) { + + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.FLOW_PORT)) { + baseType = SysMLElementTypes.FLOW_PORT; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN)) { + baseType = SysMLElementTypes.FLOW_PORT_IN; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_OUT)) { + baseType = SysMLElementTypes.FLOW_PORT_OUT; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN_OUT)) { + baseType = SysMLElementTypes.FLOW_PORT_IN_OUT; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) { + baseType = SysMLElementTypes.FLOW_PORT_NA; + } else if(superTypes.contains(UMLElementTypes.PORT )) { + baseType = UMLElementTypes.PORT ; + } + } + - if((SysMLElementTypes.FLOW_PORT == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_IN == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_OUT == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_IN_OUT == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) - || (UMLElementTypes.PORT == req.getElementType())) { + if((SysMLElementTypes.FLOW_PORT == baseType) + || (SysMLElementTypes.FLOW_PORT_IN == baseType) + || (SysMLElementTypes.FLOW_PORT_OUT == baseType) + || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType) + || (SysMLElementTypes.FLOW_PORT_NA == baseType) + || (UMLElementTypes.PORT == baseType)) { req.setContainer(type); } - if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) { + if(SysMLElementTypes.FLOW_PORT_NA == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory()); } } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java index 602faec3a25..8c1f4a10c5e 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java @@ -14,13 +14,16 @@ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; import java.util.Arrays; +import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.commands.Command; import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory; @@ -50,36 +53,46 @@ public class BlockPropertyStructureCompartmentSemanticEditPolicy extends Compart Type type = ((Property) eObject).getType(); if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) { - if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + + if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) { + baseType = SysMLElementTypes.PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) { + baseType = SysMLElementTypes.REFERENCE_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) { + baseType = SysMLElementTypes.ACTOR_PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) { + baseType = SysMLElementTypes.VALUE_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) { + baseType = SysMLElementTypes.CONSTRAINT_PROPERTY; + } else if(superTypes.contains(UMLElementTypes.PROPERTY)) { + baseType = UMLElementTypes.PROPERTY; + } + + } + + if(SysMLElementTypes.PART_PROPERTY == baseType) { req.setContainer(type); req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory()); - } - - if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) { + } else if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) { req.setContainer(type); req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory()); - } - - if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) { + } else if(SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) { req.setContainer(type); req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory()); - } - - if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) { + }else if(SysMLElementTypes.VALUE_PROPERTY == baseType) { req.setContainer(type); req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory()); - } - - if(UMLElementTypes.PROPERTY == req.getElementType()) { + } else if(UMLElementTypes.PROPERTY == baseType) { req.setContainer(type); - } - - if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) { + } else if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) { req.setContainer(type); req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory()); } - - } else if ((UMLElementTypes.PROPERTY == req.getElementType()) || (Arrays.asList(req.getElementType().getAllSuperTypes()).contains(UMLElementTypes.PROPERTY))) { // Forbid Property::qualifier creation return UnexecutableCommand.INSTANCE; diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java index 73254855eb7..57b7574e813 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java @@ -13,11 +13,17 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; +import org.eclipse.papyrus.sysml.constraints.ConstraintBlock; import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes; import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil; import org.eclipse.uml2.uml.UMLPackage; @@ -33,7 +39,17 @@ public class ConstraintParameterCompartmentSemanticEditPolicy extends Compartmen @Override protected Command getCreateCommand(CreateElementRequest req) { - if(UMLElementTypes.PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(UMLElementTypes.PROPERTY)) { + baseType = UMLElementTypes.PROPERTY; + } + } + + if(UMLElementTypes.PROPERTY == baseType) { String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", req.getContainer().eContents()); //$NON-NLS-1$ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name)); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java index c7e2101c312..e1d81eb1ef0 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java @@ -13,9 +13,14 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -31,7 +36,17 @@ public class FlowPortCompartmentSemanticEditPolicy extends CompartmentSemanticEd @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) { + baseType = SysMLElementTypes.FLOW_PORT_NA; + } + } + + if(SysMLElementTypes.FLOW_PORT_NA == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory()); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java index 87879341944..6d7d2500c9d 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java @@ -13,11 +13,16 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -44,17 +49,38 @@ public class NestedBlockPropertyCompositeSemanticEditPolicy extends DefaultSeman Type type = ((Property) eObject).getType(); if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) { - if((SysMLElementTypes.FLOW_PORT == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_IN == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_OUT == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_IN_OUT == req.getElementType()) - || (SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) - || (UMLElementTypes.PORT == req.getElementType())) { + + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.FLOW_PORT)) { + baseType = SysMLElementTypes.FLOW_PORT; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN)) { + baseType = SysMLElementTypes.FLOW_PORT_IN; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_OUT)) { + baseType = SysMLElementTypes.FLOW_PORT_OUT; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN_OUT)) { + baseType = SysMLElementTypes.FLOW_PORT_IN_OUT; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) { + baseType = SysMLElementTypes.FLOW_PORT_NA; + } else if(superTypes.contains(UMLElementTypes.PORT )) { + baseType = UMLElementTypes.PORT ; + } + } + + if((SysMLElementTypes.FLOW_PORT == baseType) + || (SysMLElementTypes.FLOW_PORT_IN == baseType) + || (SysMLElementTypes.FLOW_PORT_OUT == baseType) + || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType) + || (SysMLElementTypes.FLOW_PORT_NA == baseType) + || (UMLElementTypes.PORT == baseType)) { req.setContainer(type); } - if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) { + if(SysMLElementTypes.FLOW_PORT_NA == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory()); } } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java index 622dd608d3b..d9e20429fa0 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java @@ -13,10 +13,16 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; +import org.eclipse.papyrus.sysml.blocks.Block; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -32,11 +38,24 @@ public class PartCompartmentSemanticEditPolicy extends CompartmentSemanticEditPo @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) { + baseType = SysMLElementTypes.PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) { + baseType = SysMLElementTypes.CONSTRAINT_PROPERTY; + } + } + + + if(SysMLElementTypes.PART_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory()); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java index ed795654df5..7da2226fed0 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java @@ -13,9 +13,14 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory; @@ -36,22 +41,43 @@ public class PropertyCompartmentSemanticEditPolicy extends CompartmentSemanticEd @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) { + baseType = SysMLElementTypes.PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) { + baseType = SysMLElementTypes.REFERENCE_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) { + baseType = SysMLElementTypes.ACTOR_PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) { + baseType = SysMLElementTypes.VALUE_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) { + baseType = SysMLElementTypes.FLOW_PORT_NA; + } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) { + baseType = SysMLElementTypes.CONSTRAINT_PROPERTY; + } + } + + + if(SysMLElementTypes.PART_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.ACTOR_PART_PROPERTY ==baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.VALUE_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) { + if(SysMLElementTypes.FLOW_PORT_NA == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory()); } - if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory()); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java index 19e6472a30e..b1a0317456f 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java @@ -13,9 +13,14 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -31,7 +36,17 @@ public class ReferenceCompartmentSemanticEditPolicy extends CompartmentSemanticE @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) { + baseType = SysMLElementTypes.REFERENCE_PROPERTY; + } + } + + if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory()); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java index f045b8976ee..2aa9a51e4c2 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java @@ -13,9 +13,14 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory; @@ -35,23 +40,41 @@ public class StructureCompartmentSemanticEditPolicy extends CompartmentSemanticE @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) { + baseType = SysMLElementTypes.PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) { + baseType = SysMLElementTypes.REFERENCE_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) { + baseType = SysMLElementTypes.ACTOR_PART_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) { + baseType = SysMLElementTypes.VALUE_PROPERTY; + } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) { + baseType = SysMLElementTypes.CONSTRAINT_PROPERTY; + } + } + + if(SysMLElementTypes.PART_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.VALUE_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory()); } - if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) { + if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory()); } diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java index 23d354a9d40..bd61d2b09be 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java @@ -13,9 +13,14 @@ *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.common.edit.policy; +import java.util.Arrays; +import java.util.List; + import org.eclipse.gef.commands.Command; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy; +import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory; import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; @@ -31,7 +36,17 @@ public class ValueCompartmentSemanticEditPolicy extends CompartmentSemanticEditP @Override protected Command getCreateCommand(CreateElementRequest req) { - if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) { + IElementType elementTypeToCreate = req.getElementType(); + IElementType baseType = elementTypeToCreate; + //if extended type, retrieve the sysml closest element element type + if(elementTypeToCreate instanceof IExtendedHintedElementType) { + List superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes()); + if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) { + baseType = SysMLElementTypes.VALUE_PROPERTY; + } + } + + if(SysMLElementTypes.VALUE_PROPERTY == baseType) { req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory()); } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Thumbs.db b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Thumbs.db new file mode 100644 index 00000000000..69fc6b5982e Binary files /dev/null and b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Thumbs.db differ diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml index ada1123b5b3..8e0a4c7141f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml @@ -249,13 +249,6 @@ properties="isUMLModel, isUMLProfile" type="org.eclipse.jface.viewers.ISelection"> - - - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java deleted file mode 100644 index cc61c40f1c9..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration} object. - * - * - * @generated - */ -public class ConfigurationItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addIdPropertyDescriptor(object); - addLabelPropertyDescriptor(object); - addDescriptionPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Id feature. - * - * - * @generated - */ - protected void addIdPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Configuration_id_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Configuration_id_feature", "_UI_Configuration_type"), - PaletteconfigurationPackage.Literals.CONFIGURATION__ID, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Label feature. - * - * - * @generated - */ - protected void addLabelPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Configuration_label_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Configuration_label_feature", "_UI_Configuration_type"), - PaletteconfigurationPackage.Literals.CONFIGURATION__LABEL, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Description feature. - * - * - * @generated - */ - protected void addDescriptionPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Configuration_description_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Configuration_description_feature", "_UI_Configuration_type"), - PaletteconfigurationPackage.Literals.CONFIGURATION__DESCRIPTION, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(PaletteconfigurationPackage.Literals.CONFIGURATION__ICON); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((Configuration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_Configuration_type") : - getString("_UI_Configuration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(Configuration.class)) { - case PaletteconfigurationPackage.CONFIGURATION__ID: - case PaletteconfigurationPackage.CONFIGURATION__LABEL: - case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case PaletteconfigurationPackage.CONFIGURATION__ICON: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.CONFIGURATION__ICON, - PaletteconfigurationFactory.eINSTANCE.createIconDescriptor())); - } - - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return PaletteConfigurationEditPlugin.INSTANCE; - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java deleted file mode 100644 index 62140c30bd1..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration} object. - * - * - * @generated - */ -public class DrawerConfigurationItemProvider - extends ConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public DrawerConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns DrawerConfiguration.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/DrawerConfiguration")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((DrawerConfiguration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_DrawerConfiguration_type") : - getString("_UI_DrawerConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(DrawerConfiguration.class)) { - case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS, - PaletteconfigurationFactory.eINSTANCE.createToolConfiguration())); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS, - PaletteconfigurationFactory.eINSTANCE.createStackConfiguration())); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS, - PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration())); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java deleted file mode 100644 index 5b18663e04b..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor} object. - * - * - * @generated - */ -public class ElementDescriptorItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ElementDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addElementTypeIdPropertyDescriptor(object); - addGraphicalHintsPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Element Type Id feature. - * - * - * @generated - */ - protected void addElementTypeIdPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ElementDescriptor_elementTypeId_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_elementTypeId_feature", "_UI_ElementDescriptor_type"), - PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Graphical Hints feature. - * - * - * @generated - */ - protected void addGraphicalHintsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ElementDescriptor_graphicalHints_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_graphicalHints_feature", "_UI_ElementDescriptor_type"), - PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns ElementDescriptor.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementDescriptor")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((ElementDescriptor)object).getElementTypeId(); - return label == null || label.length() == 0 ? - getString("_UI_ElementDescriptor_type") : - getString("_UI_ElementDescriptor_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(ElementDescriptor.class)) { - case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID: - case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return PaletteConfigurationEditPlugin.INSTANCE; - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java deleted file mode 100644 index fc20d3aaaf6..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor} object. - * - * - * @generated - */ -public class IconDescriptorItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public IconDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addPluginIDPropertyDescriptor(object); - addIconPathPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Plugin ID feature. - * - * - * @generated - */ - protected void addPluginIDPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IconDescriptor_pluginID_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_pluginID_feature", "_UI_IconDescriptor_type"), - PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__PLUGIN_ID, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Icon Path feature. - * - * - * @generated - */ - protected void addIconPathPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IconDescriptor_iconPath_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_iconPath_feature", "_UI_IconDescriptor_type"), - PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__ICON_PATH, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IconDescriptor.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IconDescriptor")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((IconDescriptor)object).getPluginID(); - return label == null || label.length() == 0 ? - getString("_UI_IconDescriptor_type") : - getString("_UI_IconDescriptor_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IconDescriptor.class)) { - case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID: - case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return PaletteConfigurationEditPlugin.INSTANCE; - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java deleted file mode 100644 index 911fbec96a7..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration} object. - * - * - * @generated - */ -public class LeafConfigurationItemProvider - extends ChildConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public LeafConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((LeafConfiguration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_LeafConfiguration_type") : - getString("_UI_LeafConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java deleted file mode 100644 index a63daeb7400..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.ecore.provider.EcoreEditPlugin; -import org.eclipse.emf.facet.infra.query.edit.provider.QueryEditPlugin; -import org.eclipse.papyrus.infra.queries.core.configuration.provider.ConfigurationEditPlugin; -import org.eclipse.uml2.uml.edit.UMLEditPlugin; - -/** - * This is the central singleton for the PaletteConfiguration edit plugin. - * - * - * @generated - */ -public final class PaletteConfigurationEditPlugin extends EMFPlugin { - /** - * Keep track of the singleton. - * - * - * @generated - */ - public static final PaletteConfigurationEditPlugin INSTANCE = new PaletteConfigurationEditPlugin(); - - /** - * Keep track of the singleton. - * - * - * @generated - */ - private static Implementation plugin; - - /** - * Create the instance. - * - * - * @generated - */ - public PaletteConfigurationEditPlugin() { - super - (new ResourceLocator [] { - ConfigurationEditPlugin.INSTANCE, - EcoreEditPlugin.INSTANCE, - QueryEditPlugin.INSTANCE, - UMLEditPlugin.INSTANCE, - }); - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plugin. - * - * - * @generated - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - * - * - * @generated - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java deleted file mode 100644 index 1a58a13701d..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration} object. - * - * - * @generated - */ -public class PaletteConfigurationItemProvider - extends ConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public PaletteConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns PaletteConfiguration.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/PaletteConfiguration")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((PaletteConfiguration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_PaletteConfiguration_type") : - getString("_UI_PaletteConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(PaletteConfiguration.class)) { - case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS, - PaletteconfigurationFactory.eINSTANCE.createDrawerConfiguration())); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java deleted file mode 100644 index 0ecb8636ea8..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java +++ /dev/null @@ -1,345 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.edit.provider.ChangeNotifier; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.IChangeNotifier; -import org.eclipse.emf.edit.provider.IDisposable; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.INotifyChangedListener; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationAdapterFactory; - -/** - * This is the factory that is used to provide the interfaces needed to support Viewers. - * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. - * The adapters also support Eclipse property sheets. - * Note that most of the adapters are shared among multiple instances. - * - * - * @generated - */ -public class PaletteconfigurationItemProviderAdapterFactory extends PaletteconfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { - /** - * This keeps track of the root adapter factory that delegates to this adapter factory. - * - * - * @generated - */ - protected ComposedAdapterFactory parentAdapterFactory; - - /** - * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * - * - * @generated - */ - protected IChangeNotifier changeNotifier = new ChangeNotifier(); - - /** - * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. - * - * - * @generated - */ - protected Collection supportedTypes = new ArrayList(); - - /** - * This constructs an instance. - * - * - * @generated - */ - public PaletteconfigurationItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration} instances. - * - * - * @generated - */ - protected PaletteConfigurationItemProvider paletteConfigurationItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration}. - * - * - * @generated - */ - @Override - public Adapter createPaletteConfigurationAdapter() { - if (paletteConfigurationItemProvider == null) { - paletteConfigurationItemProvider = new PaletteConfigurationItemProvider(this); - } - - return paletteConfigurationItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration} instances. - * - * - * @generated - */ - protected ToolConfigurationItemProvider toolConfigurationItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration}. - * - * - * @generated - */ - @Override - public Adapter createToolConfigurationAdapter() { - if (toolConfigurationItemProvider == null) { - toolConfigurationItemProvider = new ToolConfigurationItemProvider(this); - } - - return toolConfigurationItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration} instances. - * - * - * @generated - */ - protected StackConfigurationItemProvider stackConfigurationItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration}. - * - * - * @generated - */ - @Override - public Adapter createStackConfigurationAdapter() { - if (stackConfigurationItemProvider == null) { - stackConfigurationItemProvider = new StackConfigurationItemProvider(this); - } - - return stackConfigurationItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration} instances. - * - * - * @generated - */ - protected DrawerConfigurationItemProvider drawerConfigurationItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration}. - * - * - * @generated - */ - @Override - public Adapter createDrawerConfigurationAdapter() { - if (drawerConfigurationItemProvider == null) { - drawerConfigurationItemProvider = new DrawerConfigurationItemProvider(this); - } - - return drawerConfigurationItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor} instances. - * - * - * @generated - */ - protected IconDescriptorItemProvider iconDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor}. - * - * - * @generated - */ - @Override - public Adapter createIconDescriptorAdapter() { - if (iconDescriptorItemProvider == null) { - iconDescriptorItemProvider = new IconDescriptorItemProvider(this); - } - - return iconDescriptorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor} instances. - * - * - * @generated - */ - protected ElementDescriptorItemProvider elementDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor}. - * - * - * @generated - */ - @Override - public Adapter createElementDescriptorAdapter() { - if (elementDescriptorItemProvider == null) { - elementDescriptorItemProvider = new ElementDescriptorItemProvider(this); - } - - return elementDescriptorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration} instances. - * - * - * @generated - */ - protected SeparatorConfigurationItemProvider separatorConfigurationItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration}. - * - * - * @generated - */ - @Override - public Adapter createSeparatorConfigurationAdapter() { - if (separatorConfigurationItemProvider == null) { - separatorConfigurationItemProvider = new SeparatorConfigurationItemProvider(this); - } - - return separatorConfigurationItemProvider; - } - - /** - * This returns the root adapter factory that contains this factory. - * - * - * @generated - */ - public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } - - /** - * This sets the composed adapter factory that contains this factory. - * - * - * @generated - */ - public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } - - /** - * - * - * @generated - */ - @Override - public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } - - /** - * This implementation substitutes the factory itself as the key for the adapter. - * - * - * @generated - */ - @Override - public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } - - /** - * - * - * @generated - */ - @Override - public Object adapt(Object object, Object type) { - if (isFactoryForType(type)) { - Object adapter = super.adapt(object, type); - if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { - return adapter; - } - } - - return null; - } - - /** - * This adds a listener. - * - * - * @generated - */ - public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } - - /** - * This removes a listener. - * - * - * @generated - */ - public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } - - /** - * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. - * - * - * @generated - */ - public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); - - if (parentAdapterFactory != null) { - parentAdapterFactory.fireNotifyChanged(notification); - } - } - - /** - * This disposes all of the item providers created by this factory. - * - * - * @generated - */ - public void dispose() { - if (paletteConfigurationItemProvider != null) paletteConfigurationItemProvider.dispose(); - if (toolConfigurationItemProvider != null) toolConfigurationItemProvider.dispose(); - if (stackConfigurationItemProvider != null) stackConfigurationItemProvider.dispose(); - if (drawerConfigurationItemProvider != null) drawerConfigurationItemProvider.dispose(); - if (iconDescriptorItemProvider != null) iconDescriptorItemProvider.dispose(); - if (elementDescriptorItemProvider != null) elementDescriptorItemProvider.dispose(); - if (separatorConfigurationItemProvider != null) separatorConfigurationItemProvider.dispose(); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java deleted file mode 100644 index f8b5d2eecbf..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration} object. - * - * - * @generated - */ -public class SeparatorConfigurationItemProvider - extends LeafConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public SeparatorConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns SeparatorConfiguration.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/SeparatorConfiguration")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((SeparatorConfiguration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_SeparatorConfiguration_type") : - getString("_UI_SeparatorConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java deleted file mode 100644 index 08a699eb8d5..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration} object. - * - * - * @generated - */ -public class StackConfigurationItemProvider - extends ChildConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public StackConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns StackConfiguration.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/StackConfiguration")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((StackConfiguration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_StackConfiguration_type") : - getString("_UI_StackConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(StackConfiguration.class)) { - case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS, - PaletteconfigurationFactory.eINSTANCE.createToolConfiguration())); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS, - PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration())); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java deleted file mode 100644 index 69f16efc273..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; -import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration} object. - * - * - * @generated - */ -public class ToolConfigurationItemProvider - extends LeafConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ToolConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addPreValidationQueryPropertyDescriptor(object); - addKindPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Pre Validation Query feature. - * - * - * @generated - */ - protected void addPreValidationQueryPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ToolConfiguration_preValidationQuery_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ToolConfiguration_preValidationQuery_feature", "_UI_ToolConfiguration_type"), - PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__PRE_VALIDATION_QUERY, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Kind feature. - * - * - * @generated - */ - protected void addKindPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ToolConfiguration_kind_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ToolConfiguration_kind_feature", "_UI_ToolConfiguration_type"), - PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__KIND, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns ToolConfiguration.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ToolConfiguration")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((ToolConfiguration)object).getId(); - return label == null || label.length() == 0 ? - getString("_UI_ToolConfiguration_type") : - getString("_UI_ToolConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(ToolConfiguration.class)) { - case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS, - PaletteconfigurationFactory.eINSTANCE.createElementDescriptor())); - } - -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java new file mode 100644 index 00000000000..34f0d3b7a9c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java @@ -0,0 +1,100 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration} object. + * + * + * @generated + */ +public class ChildConfigurationItemProvider + extends ConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ChildConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ChildConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_ChildConfiguration_type") : + getString("_UI_ChildConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java new file mode 100644 index 00000000000..781144360e0 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java @@ -0,0 +1,236 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration} object. + * + * + * @generated + */ +public class ConfigurationItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addIdPropertyDescriptor(object); + addLabelPropertyDescriptor(object); + addDescriptionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Id feature. + * + * + * @generated + */ + protected void addIdPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Configuration_id_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Configuration_id_feature", "_UI_Configuration_type"), + PaletteconfigurationPackage.Literals.CONFIGURATION__ID, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Label feature. + * + * + * @generated + */ + protected void addLabelPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Configuration_label_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Configuration_label_feature", "_UI_Configuration_type"), + PaletteconfigurationPackage.Literals.CONFIGURATION__LABEL, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Description feature. + * + * + * @generated + */ + protected void addDescriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Configuration_description_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Configuration_description_feature", "_UI_Configuration_type"), + PaletteconfigurationPackage.Literals.CONFIGURATION__DESCRIPTION, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PaletteconfigurationPackage.Literals.CONFIGURATION__ICON); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Configuration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_Configuration_type") : + getString("_UI_Configuration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Configuration.class)) { + case PaletteconfigurationPackage.CONFIGURATION__ID: + case PaletteconfigurationPackage.CONFIGURATION__LABEL: + case PaletteconfigurationPackage.CONFIGURATION__DESCRIPTION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PaletteconfigurationPackage.CONFIGURATION__ICON: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.CONFIGURATION__ICON, + PaletteconfigurationFactory.eINSTANCE.createIconDescriptor())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PaletteConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java new file mode 100644 index 00000000000..671b9acf667 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java @@ -0,0 +1,167 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration} object. + * + * + * @generated + */ +public class DrawerConfigurationItemProvider + extends ConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public DrawerConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns DrawerConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/DrawerConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((DrawerConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_DrawerConfiguration_type") : + getString("_UI_DrawerConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(DrawerConfiguration.class)) { + case PaletteconfigurationPackage.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS, + PaletteconfigurationFactory.eINSTANCE.createToolConfiguration())); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS, + PaletteconfigurationFactory.eINSTANCE.createStackConfiguration())); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.DRAWER_CONFIGURATION__OWNED_CONFIGURATIONS, + PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration())); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java new file mode 100644 index 00000000000..1e0b98ec2f7 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java @@ -0,0 +1,182 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor} object. + * + * + * @generated + */ +public class ElementDescriptorItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ElementDescriptorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addElementTypeIdPropertyDescriptor(object); + addGraphicalHintsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Element Type Id feature. + * + * + * @generated + */ + protected void addElementTypeIdPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementDescriptor_elementTypeId_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_elementTypeId_feature", "_UI_ElementDescriptor_type"), + PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Graphical Hints feature. + * + * + * @generated + */ + protected void addGraphicalHintsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementDescriptor_graphicalHints_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ElementDescriptor_graphicalHints_feature", "_UI_ElementDescriptor_type"), + PaletteconfigurationPackage.Literals.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns ElementDescriptor.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementDescriptor")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ElementDescriptor)object).getElementTypeId(); + return label == null || label.length() == 0 ? + getString("_UI_ElementDescriptor_type") : + getString("_UI_ElementDescriptor_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ElementDescriptor.class)) { + case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__ELEMENT_TYPE_ID: + case PaletteconfigurationPackage.ELEMENT_DESCRIPTOR__GRAPHICAL_HINTS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PaletteConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java new file mode 100644 index 00000000000..c85c61740e9 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java @@ -0,0 +1,182 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor} object. + * + * + * @generated + */ +public class IconDescriptorItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IconDescriptorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addPluginIDPropertyDescriptor(object); + addIconPathPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Plugin ID feature. + * + * + * @generated + */ + protected void addPluginIDPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IconDescriptor_pluginID_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_pluginID_feature", "_UI_IconDescriptor_type"), + PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__PLUGIN_ID, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Icon Path feature. + * + * + * @generated + */ + protected void addIconPathPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IconDescriptor_iconPath_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IconDescriptor_iconPath_feature", "_UI_IconDescriptor_type"), + PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR__ICON_PATH, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns IconDescriptor.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IconDescriptor")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((IconDescriptor)object).getPluginID(); + return label == null || label.length() == 0 ? + getString("_UI_IconDescriptor_type") : + getString("_UI_IconDescriptor_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(IconDescriptor.class)) { + case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID: + case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PaletteConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java new file mode 100644 index 00000000000..b8614a33ee9 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java @@ -0,0 +1,100 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration} object. + * + * + * @generated + */ +public class LeafConfigurationItemProvider + extends ChildConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public LeafConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((LeafConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_LeafConfiguration_type") : + getString("_UI_LeafConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java new file mode 100644 index 00000000000..8b00d61b41d --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java @@ -0,0 +1,92 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +/** + * This is the central singleton for the PaletteConfiguration edit plugin. + * + * + * @generated + */ +public final class PaletteConfigurationEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final PaletteConfigurationEditPlugin INSTANCE = new PaletteConfigurationEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public PaletteConfigurationEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java new file mode 100644 index 00000000000..865a691f6de --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java @@ -0,0 +1,157 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration} object. + * + * + * @generated + */ +public class PaletteConfigurationItemProvider + extends ConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public PaletteConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns PaletteConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/PaletteConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((PaletteConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_PaletteConfiguration_type") : + getString("_UI_PaletteConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(PaletteConfiguration.class)) { + case PaletteconfigurationPackage.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.PALETTE_CONFIGURATION__DRAWER_CONFIGURATIONS, + PaletteconfigurationFactory.eINSTANCE.createDrawerConfiguration())); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java new file mode 100644 index 00000000000..670952410dc --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java @@ -0,0 +1,343 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class PaletteconfigurationItemProviderAdapterFactory extends PaletteconfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public PaletteconfigurationItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration} instances. + * + * + * @generated + */ + protected PaletteConfigurationItemProvider paletteConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createPaletteConfigurationAdapter() { + if (paletteConfigurationItemProvider == null) { + paletteConfigurationItemProvider = new PaletteConfigurationItemProvider(this); + } + + return paletteConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration} instances. + * + * + * @generated + */ + protected ToolConfigurationItemProvider toolConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createToolConfigurationAdapter() { + if (toolConfigurationItemProvider == null) { + toolConfigurationItemProvider = new ToolConfigurationItemProvider(this); + } + + return toolConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration} instances. + * + * + * @generated + */ + protected StackConfigurationItemProvider stackConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createStackConfigurationAdapter() { + if (stackConfigurationItemProvider == null) { + stackConfigurationItemProvider = new StackConfigurationItemProvider(this); + } + + return stackConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration} instances. + * + * + * @generated + */ + protected DrawerConfigurationItemProvider drawerConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createDrawerConfigurationAdapter() { + if (drawerConfigurationItemProvider == null) { + drawerConfigurationItemProvider = new DrawerConfigurationItemProvider(this); + } + + return drawerConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor} instances. + * + * + * @generated + */ + protected IconDescriptorItemProvider iconDescriptorItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor}. + * + * + * @generated + */ + @Override + public Adapter createIconDescriptorAdapter() { + if (iconDescriptorItemProvider == null) { + iconDescriptorItemProvider = new IconDescriptorItemProvider(this); + } + + return iconDescriptorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor} instances. + * + * + * @generated + */ + protected ElementDescriptorItemProvider elementDescriptorItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor}. + * + * + * @generated + */ + @Override + public Adapter createElementDescriptorAdapter() { + if (elementDescriptorItemProvider == null) { + elementDescriptorItemProvider = new ElementDescriptorItemProvider(this); + } + + return elementDescriptorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration} instances. + * + * + * @generated + */ + protected SeparatorConfigurationItemProvider separatorConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createSeparatorConfigurationAdapter() { + if (separatorConfigurationItemProvider == null) { + separatorConfigurationItemProvider = new SeparatorConfigurationItemProvider(this); + } + + return separatorConfigurationItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (paletteConfigurationItemProvider != null) paletteConfigurationItemProvider.dispose(); + if (toolConfigurationItemProvider != null) toolConfigurationItemProvider.dispose(); + if (stackConfigurationItemProvider != null) stackConfigurationItemProvider.dispose(); + if (drawerConfigurationItemProvider != null) drawerConfigurationItemProvider.dispose(); + if (iconDescriptorItemProvider != null) iconDescriptorItemProvider.dispose(); + if (elementDescriptorItemProvider != null) elementDescriptorItemProvider.dispose(); + if (separatorConfigurationItemProvider != null) separatorConfigurationItemProvider.dispose(); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java new file mode 100644 index 00000000000..ecebb1866f4 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java @@ -0,0 +1,111 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration} object. + * + * + * @generated + */ +public class SeparatorConfigurationItemProvider + extends LeafConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public SeparatorConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SeparatorConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SeparatorConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((SeparatorConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_SeparatorConfiguration_type") : + getString("_UI_SeparatorConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java new file mode 100644 index 00000000000..e17089de8fb --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java @@ -0,0 +1,162 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration} object. + * + * + * @generated + */ +public class StackConfigurationItemProvider + extends ChildConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public StackConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns StackConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/StackConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StackConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_StackConfiguration_type") : + getString("_UI_StackConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(StackConfiguration.class)) { + case PaletteconfigurationPackage.STACK_CONFIGURATION__OWNED_CONFIGURATIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS, + PaletteconfigurationFactory.eINSTANCE.createToolConfiguration())); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.STACK_CONFIGURATION__OWNED_CONFIGURATIONS, + PaletteconfigurationFactory.eINSTANCE.createSeparatorConfiguration())); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java new file mode 100644 index 00000000000..18c5e5cca0c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java @@ -0,0 +1,185 @@ +/** + */ +package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; +import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration} object. + * + * + * @generated + */ +public class ToolConfigurationItemProvider + extends LeafConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ToolConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addKindPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Kind feature. + * + * + * @generated + */ + protected void addKindPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ToolConfiguration_kind_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ToolConfiguration_kind_feature", "_UI_ToolConfiguration_type"), + PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__KIND, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ToolConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ToolConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ToolConfiguration)object).getId(); + return label == null || label.length() == 0 ? + getString("_UI_ToolConfiguration_type") : + getString("_UI_ToolConfiguration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ToolConfiguration.class)) { + case PaletteconfigurationPackage.TOOL_CONFIGURATION__KIND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PaletteconfigurationPackage.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__ELEMENT_DESCRIPTORS, + PaletteconfigurationFactory.eINSTANCE.createElementDescriptor())); + } + +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore index c1a3bec3865..94cfbb03b97 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore @@ -1,14 +1,12 @@ - + - - - -
    - - - - - - - - - - - - - - - - - - - - @@ -250,20 +227,6 @@ - - - - - - - - - - - - - - diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel index e87aa1a6cce..4f05bf87abb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel @@ -1,6 +1,5 @@ - + usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"> PaletteConfiguration.ecore @@ -22,7 +21,6 @@ - diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml index ce138e20d65..6e3e04edfd6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml @@ -22,5 +22,4 @@ type="paletteconfiguration" class="org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationResourceFactoryImpl"/> - diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedConnectionToolEntry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedConnectionToolEntry.java index 6272821c83f..d76a077d70f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedConnectionToolEntry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedConnectionToolEntry.java @@ -18,8 +18,8 @@ import java.util.List; import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry; import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry; import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor; @@ -47,7 +47,7 @@ public class ExtendedConnectionToolEntry extends PaletteToolEntry implements IEl this.elementDescriptors = elementDescriptors; for(ElementDescriptor elementDescriptor : elementDescriptors) { - elementTypes.add(ExtendedTypesRegistry.getInstance().getType(elementDescriptor.getElementTypeId())); + elementTypes.add(ElementTypeRegistry.getInstance().getType(elementDescriptor.getElementTypeId())); } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedCreationToolEntry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedCreationToolEntry.java index 3724cf0320f..f8aac80424a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedCreationToolEntry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedCreationToolEntry.java @@ -16,10 +16,11 @@ package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider; import java.util.ArrayList; import java.util.List; +import org.eclipse.gef.palette.CombinedTemplateCreationEntry; import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry; import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry; import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor; @@ -47,7 +48,7 @@ public class ExtendedCreationToolEntry extends PaletteToolEntry implements IElem this.elementDescriptors = elementDescriptors; for(ElementDescriptor elementDescriptor : elementDescriptors) { - elementTypes.add(ExtendedTypesRegistry.getInstance().getType(elementDescriptor.getElementTypeId())); + elementTypes.add(ElementTypeRegistry.getInstance().getType(elementDescriptor.getElementTypeId())); } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java index 3705a1fd291..77e13bcd66b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java @@ -37,6 +37,7 @@ import org.eclipse.gef.palette.PaletteRoot; import org.eclipse.gef.palette.PaletteSeparator; import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.ContributeToPaletteOperation; import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry; import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider; import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory; @@ -99,16 +100,15 @@ public class ExtendedPluginPaletteProvider extends AbstractProvider implements I /** default icon for drawers */ protected static ImageDescriptor DEFAULT_DRAWER_IMAGE_DESCRIPTOR = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "/icons/drawer.gif"); - /** - * Constructor. - */ - public ExtendedPluginPaletteProvider() { - } - /** * {@inheritDoc} */ public boolean provides(IOperation operation) { + if(operation instanceof ContributeToPaletteOperation) { + IEditorPart part = ((ContributeToPaletteOperation)operation).getEditor(); + // check this can be a papyrus one. Otherwise, there should be no contribution + return true; + } return false; } diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF index 0b5b57eeb56..3b73140cab2 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF @@ -2,17 +2,33 @@ Manifest-Version: 1.0 Export-Package: org.eclipse.papyrus.uml.tools.extendedtypes, org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration, org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl, - org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util + org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util, + org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util, + org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util, + org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.emf.ecore.xmi;visibility:=reexport, - org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0";visibility:=reexport, org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0";visibility:=reexport, - org.eclipse.emf.facet.infra.query;visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, org.eclipse.uml2.uml, org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0", org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0", - org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0" + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", + org.eclipse.papyrus.infra.extendedtypes.emf;bundle-version="1.0.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0", + org.eclipse.papyrus.uml.tools;bundle-version="1.0.0", + org.eclipse.papyrus.infra.emf;bundle-version="1.0.0", + org.eclipse.papyrus.views.properties;bundle-version="1.0.0", + org.eclipse.papyrus.uml.properties;bundle-version="1.0.0", + org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0", + org.eclipse.swt Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: . @@ -20,9 +36,7 @@ Bundle-Version: 1.0.0.qualifier Bundle-Name: %pluginName Bundle-Localization: plugin Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.uml.tools.extendedtypes.Activato - r$Implementation -Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.extendedtypes;singl - eton:=true +Bundle-Activator: org.eclipse.papyrus.uml.tools.extendedtypes.Activator$Implementation +Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.extendedtypes;singleton:=true Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore index 76e7e6a80cd..8fe7b9866c8 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore @@ -1,17 +1,36 @@ + eSuperTypes="platform:/plugin/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration"> - + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag index 4803a61de04..112b44b0f51 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag @@ -16,25 +16,6 @@ - - -
    - - - - - - - - - - - - - - - - @@ -63,15 +44,146 @@ + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - @@ -86,4 +198,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel index 0a9bc65ef26..feca27a51ca 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel @@ -1,21 +1,36 @@ - - - ApplyStereotypeActionConfiguration.ecore - - - - - - - - - - - + + + ApplyStereotypeActionConfiguration.ecore + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore new file mode 100644 index 00000000000..7a0216a825f --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore @@ -0,0 +1,10 @@ + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecorediag new file mode 100644 index 00000000000..70274fef3c2 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecorediag @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.genmodel new file mode 100644 index 00000000000..29df9b5d40e --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.genmodel @@ -0,0 +1,19 @@ + + + InvariantStereotypeConfiguration.ecore + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore new file mode 100644 index 00000000000..2540c266ab7 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore @@ -0,0 +1,11 @@ + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag new file mode 100644 index 00000000000..3603f6ef5bf --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel new file mode 100644 index 00000000000..20e99726e8a --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel @@ -0,0 +1,19 @@ + + + SetTypeActionConfiguration.ecore + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecore new file mode 100644 index 00000000000..4a9e6b712da --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecore @@ -0,0 +1,10 @@ + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecorediag new file mode 100644 index 00000000000..978ec4aab49 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.ecorediag @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.genmodel new file mode 100644 index 00000000000..3ff674e4944 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/StereotypedElementMatcherConfiguration.genmodel @@ -0,0 +1,18 @@ + + + StereotypedElementMatcherConfiguration.ecore + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml index 3f738ab9750..5deec45fe83 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml @@ -1,40 +1,92 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java deleted file mode 100644 index 21561c38347..00000000000 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.uml.tools.extendedtypes; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.ResourceLocator; - -/** - * This is the central singleton for the ApplyStereotypeActionConfiguration model plugin. - * - * - * @generated - */ -public final class Activator extends EMFPlugin { - /** - * Keep track of the singleton. - * - * - * @generated - */ - public static final Activator INSTANCE = new Activator(); - - /** - * Keep track of the singleton. - * - * - * @generated - */ - private static Implementation plugin; - - /** - * Create the instance. - * - * - * @generated - */ - public Activator() { - super(new ResourceLocator [] {}); - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plugin. - * - * - * @generated - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - * - * - * @generated - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - } - -} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfiguration.java index 1f3d5c2ef0b..c822f4e79e7 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfiguration.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfiguration.java @@ -1,13 +1,20 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; import org.eclipse.emf.common.util.EList; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; /** * @@ -25,7 +32,7 @@ import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; * @model * @generated */ -public interface ApplyStereotypeActionConfiguration extends PostActionConfiguration { +public interface ApplyStereotypeActionConfiguration extends SemanticActionConfiguration { /** * Returns the value of the 'Stereotypes To Apply' containment reference list. * The list contents are of type {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply}. diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationFactory.java index 06cd9ecfb12..9d36c1d1afb 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationFactory.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationFactory.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; @@ -43,6 +49,42 @@ public interface ApplyStereotypeActionConfigurationFactory extends EFactory { */ StereotypeToApply createStereotypeToApply(); + /** + * Returns a new object of class 'Feature To Set'. + * + * + * @return a new object of class 'Feature To Set'. + * @generated + */ + FeatureToSet createFeatureToSet(); + + /** + * Returns a new object of class 'List Value'. + * + * + * @return a new object of class 'List Value'. + * @generated + */ + ListValue createListValue(); + + /** + * Returns a new object of class 'Constant Value'. + * + * + * @return a new object of class 'Constant Value'. + * @generated + */ + ConstantValue createConstantValue(); + + /** + * Returns a new object of class 'Query Execution Value'. + * + * + * @return a new object of class 'Query Execution Value'. + * @generated + */ + QueryExecutionValue createQueryExecutionValue(); + /** * Returns the package supported by this factory. * diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java index e3f19f6b199..cdcba5b4562 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; @@ -10,6 +16,7 @@ import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; + import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; /** @@ -42,7 +49,7 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { * * @generated */ - String eNS_URI = "http://www.eclipse.org/papyrus/diagram/types/applystereotypeactionconfiguration/0.7"; + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/uml/applystereotypeaction/1.0"; /** * The package namespace name. @@ -71,22 +78,40 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { int APPLY_STEREOTYPE_ACTION_CONFIGURATION = 0; /** - * The feature id for the 'Label' attribute. + * The feature id for the 'Name' attribute. * * * @generated * @ordered */ - int APPLY_STEREOTYPE_ACTION_CONFIGURATION__LABEL = ExtendedtypesPackage.POST_ACTION_CONFIGURATION__LABEL; + int APPLY_STEREOTYPE_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME; /** - * The feature id for the 'Id' attribute. + * The feature id for the 'Description' attribute. * * * @generated * @ordered */ - int APPLY_STEREOTYPE_ACTION_CONFIGURATION__ID = ExtendedtypesPackage.POST_ACTION_CONFIGURATION__ID; + int APPLY_STEREOTYPE_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * @generated + * @ordered + */ + int APPLY_STEREOTYPE_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * @generated + * @ordered + */ + int APPLY_STEREOTYPE_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY; /** * The feature id for the 'Stereotypes To Apply' containment reference list. @@ -95,7 +120,7 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { * @generated * @ordered */ - int APPLY_STEREOTYPE_ACTION_CONFIGURATION__STEREOTYPES_TO_APPLY = ExtendedtypesPackage.POST_ACTION_CONFIGURATION_FEATURE_COUNT + 0; + int APPLY_STEREOTYPE_ACTION_CONFIGURATION__STEREOTYPES_TO_APPLY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0; /** * The number of structural features of the 'Apply Stereotype Action Configuration' class. @@ -104,7 +129,7 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { * @generated * @ordered */ - int APPLY_STEREOTYPE_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.POST_ACTION_CONFIGURATION_FEATURE_COUNT + 1; + int APPLY_STEREOTYPE_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1; /** * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.StereotypeToApplyImpl Stereotype To Apply}' class. @@ -143,6 +168,15 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { */ int STEREOTYPE_TO_APPLY__REQUIRED_PROFILES = 2; + /** + * The feature id for the 'Features To Set' containment reference list. + * + * + * @generated + * @ordered + */ + int STEREOTYPE_TO_APPLY__FEATURES_TO_SET = 3; + /** * The number of structural features of the 'Stereotype To Apply' class. * @@ -150,7 +184,157 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { * @generated * @ordered */ - int STEREOTYPE_TO_APPLY_FEATURE_COUNT = 3; + int STEREOTYPE_TO_APPLY_FEATURE_COUNT = 4; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl Feature To Set}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getFeatureToSet() + * @generated + */ + int FEATURE_TO_SET = 2; + + /** + * The feature id for the 'Feature Name' attribute. + * + * + * @generated + * @ordered + */ + int FEATURE_TO_SET__FEATURE_NAME = 0; + + /** + * The feature id for the 'Value' containment reference. + * + * + * @generated + * @ordered + */ + int FEATURE_TO_SET__VALUE = 1; + + /** + * The number of structural features of the 'Feature To Set' class. + * + * + * @generated + * @ordered + */ + int FEATURE_TO_SET_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureValueImpl Feature Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getFeatureValue() + * @generated + */ + int FEATURE_VALUE = 3; + + /** + * The number of structural features of the 'Feature Value' class. + * + * + * @generated + * @ordered + */ + int FEATURE_VALUE_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ListValueImpl List Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ListValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getListValue() + * @generated + */ + int LIST_VALUE = 4; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int LIST_VALUE__VALUES = FEATURE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'List Value' class. + * + * + * @generated + * @ordered + */ + int LIST_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ConstantValueImpl Constant Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ConstantValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getConstantValue() + * @generated + */ + int CONSTANT_VALUE = 5; + + /** + * The feature id for the 'Value Instance' containment reference. + * + * + * @generated + * @ordered + */ + int CONSTANT_VALUE__VALUE_INSTANCE = FEATURE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Constant Value' class. + * + * + * @generated + * @ordered + */ + int CONSTANT_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.DynamicValueImpl Dynamic Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.DynamicValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getDynamicValue() + * @generated + */ + int DYNAMIC_VALUE = 6; + + /** + * The number of structural features of the 'Dynamic Value' class. + * + * + * @generated + * @ordered + */ + int DYNAMIC_VALUE_FEATURE_COUNT = FEATURE_VALUE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.QueryExecutionValueImpl Query Execution Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.QueryExecutionValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getQueryExecutionValue() + * @generated + */ + int QUERY_EXECUTION_VALUE = 7; + + /** + * The number of structural features of the 'Query Execution Value' class. + * + * + * @generated + * @ordered + */ + int QUERY_EXECUTION_VALUE_FEATURE_COUNT = DYNAMIC_VALUE_FEATURE_COUNT + 0; /** @@ -217,6 +401,121 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { */ EAttribute getStereotypeToApply_RequiredProfiles(); + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply#getFeaturesToSet Features To Set}'. + * + * + * @return the meta object for the containment reference list 'Features To Set'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply#getFeaturesToSet() + * @see #getStereotypeToApply() + * @generated + */ + EReference getStereotypeToApply_FeaturesToSet(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet Feature To Set}'. + * + * + * @return the meta object for class 'Feature To Set'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet + * @generated + */ + EClass getFeatureToSet(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getFeatureName Feature Name}'. + * + * + * @return the meta object for the attribute 'Feature Name'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getFeatureName() + * @see #getFeatureToSet() + * @generated + */ + EAttribute getFeatureToSet_FeatureName(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getValue Value}'. + * + * + * @return the meta object for the containment reference 'Value'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getValue() + * @see #getFeatureToSet() + * @generated + */ + EReference getFeatureToSet_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue Feature Value}'. + * + * + * @return the meta object for class 'Feature Value'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue + * @generated + */ + EClass getFeatureValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue List Value}'. + * + * + * @return the meta object for class 'List Value'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue + * @generated + */ + EClass getListValue(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue#getValues Values}'. + * + * + * @return the meta object for the containment reference list 'Values'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue#getValues() + * @see #getListValue() + * @generated + */ + EReference getListValue_Values(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue Constant Value}'. + * + * + * @return the meta object for class 'Constant Value'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue + * @generated + */ + EClass getConstantValue(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue#getValueInstance Value Instance}'. + * + * + * @return the meta object for the containment reference 'Value Instance'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue#getValueInstance() + * @see #getConstantValue() + * @generated + */ + EReference getConstantValue_ValueInstance(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.DynamicValue Dynamic Value}'. + * + * + * @return the meta object for class 'Dynamic Value'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.DynamicValue + * @generated + */ + EClass getDynamicValue(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.QueryExecutionValue Query Execution Value}'. + * + * + * @return the meta object for class 'Query Execution Value'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.QueryExecutionValue + * @generated + */ + EClass getQueryExecutionValue(); + /** * Returns the factory that creates the instances of the model. * @@ -291,6 +590,106 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage { */ EAttribute STEREOTYPE_TO_APPLY__REQUIRED_PROFILES = eINSTANCE.getStereotypeToApply_RequiredProfiles(); + /** + * The meta object literal for the 'Features To Set' containment reference list feature. + * + * + * @generated + */ + EReference STEREOTYPE_TO_APPLY__FEATURES_TO_SET = eINSTANCE.getStereotypeToApply_FeaturesToSet(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl Feature To Set}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getFeatureToSet() + * @generated + */ + EClass FEATURE_TO_SET = eINSTANCE.getFeatureToSet(); + + /** + * The meta object literal for the 'Feature Name' attribute feature. + * + * + * @generated + */ + EAttribute FEATURE_TO_SET__FEATURE_NAME = eINSTANCE.getFeatureToSet_FeatureName(); + + /** + * The meta object literal for the 'Value' containment reference feature. + * + * + * @generated + */ + EReference FEATURE_TO_SET__VALUE = eINSTANCE.getFeatureToSet_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureValueImpl Feature Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getFeatureValue() + * @generated + */ + EClass FEATURE_VALUE = eINSTANCE.getFeatureValue(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ListValueImpl List Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ListValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getListValue() + * @generated + */ + EClass LIST_VALUE = eINSTANCE.getListValue(); + + /** + * The meta object literal for the 'Values' containment reference list feature. + * + * + * @generated + */ + EReference LIST_VALUE__VALUES = eINSTANCE.getListValue_Values(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ConstantValueImpl Constant Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ConstantValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getConstantValue() + * @generated + */ + EClass CONSTANT_VALUE = eINSTANCE.getConstantValue(); + + /** + * The meta object literal for the 'Value Instance' containment reference feature. + * + * + * @generated + */ + EReference CONSTANT_VALUE__VALUE_INSTANCE = eINSTANCE.getConstantValue_ValueInstance(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.DynamicValueImpl Dynamic Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.DynamicValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getDynamicValue() + * @generated + */ + EClass DYNAMIC_VALUE = eINSTANCE.getDynamicValue(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.QueryExecutionValueImpl Query Execution Value}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.QueryExecutionValueImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ApplyStereotypeActionConfigurationPackageImpl#getQueryExecutionValue() + * @generated + */ + EClass QUERY_EXECUTION_VALUE = eINSTANCE.getQueryExecutionValue(); + } } //ApplyStereotypeActionConfigurationPackage diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ConstantValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ConstantValue.java new file mode 100644 index 00000000000..244da2a9701 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ConstantValue.java @@ -0,0 +1,60 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * + * A representation of the model object 'Constant Value'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue#getValueInstance Value Instance}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getConstantValue() + * @model + * @generated + */ +public interface ConstantValue extends FeatureValue { + /** + * Returns the value of the 'Value Instance' containment reference. + * + *

    + * If the meaning of the 'Value Instance' containment reference isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Value Instance' containment reference. + * @see #setValueInstance(ValueSpecification) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getConstantValue_ValueInstance() + * @model containment="true" + * @generated + */ + ValueSpecification getValueInstance(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue#getValueInstance Value Instance}' containment reference. + * + * + * @param value the new value of the 'Value Instance' containment reference. + * @see #getValueInstance() + * @generated + */ + void setValueInstance(ValueSpecification value); + +} // ConstantValue diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/DynamicValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/DynamicValue.java new file mode 100644 index 00000000000..b43b2e2bc54 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/DynamicValue.java @@ -0,0 +1,27 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + + +/** + * + * A representation of the model object 'Dynamic Value'. + * + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getDynamicValue() + * @model abstract="true" + * @generated + */ +public interface DynamicValue extends FeatureValue { +} // DynamicValue diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java new file mode 100644 index 00000000000..c0b83e52b34 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java @@ -0,0 +1,87 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Feature To Set'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getFeatureName Feature Name}
    • + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getValue Value}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getFeatureToSet() + * @model + * @generated + */ +public interface FeatureToSet extends EObject { + /** + * Returns the value of the 'Feature Name' attribute. + * + *

    + * If the meaning of the 'Feature Name' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Feature Name' attribute. + * @see #setFeatureName(String) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getFeatureToSet_FeatureName() + * @model required="true" + * @generated + */ + String getFeatureName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getFeatureName Feature Name}' attribute. + * + * + * @param value the new value of the 'Feature Name' attribute. + * @see #getFeatureName() + * @generated + */ + void setFeatureName(String value); + + /** + * Returns the value of the 'Value' containment reference. + * + *

    + * If the meaning of the 'Value' containment reference isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Value' containment reference. + * @see #setValue(FeatureValue) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getFeatureToSet_Value() + * @model containment="true" required="true" + * @generated + */ + FeatureValue getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getValue Value}' containment reference. + * + * + * @param value the new value of the 'Value' containment reference. + * @see #getValue() + * @generated + */ + void setValue(FeatureValue value); + +} // FeatureToSet diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureValue.java new file mode 100644 index 00000000000..39639b3057f --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureValue.java @@ -0,0 +1,28 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Feature Value'. + * + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getFeatureValue() + * @model abstract="true" + * @generated + */ +public interface FeatureValue extends EObject { +} // FeatureValue diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ListValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ListValue.java new file mode 100644 index 00000000000..1687e73d12f --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ListValue.java @@ -0,0 +1,50 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'List Value'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue#getValues Values}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getListValue() + * @model + * @generated + */ +public interface ListValue extends FeatureValue { + /** + * Returns the value of the 'Values' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue}. + * + *

    + * If the meaning of the 'Values' containment reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Values' containment reference list. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getListValue_Values() + * @model containment="true" + * @generated + */ + EList getValues(); + +} // ListValue diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/QueryExecutionValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/QueryExecutionValue.java new file mode 100644 index 00000000000..56fc1a83eee --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/QueryExecutionValue.java @@ -0,0 +1,27 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + + +/** + * + * A representation of the model object 'Query Execution Value'. + * + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getQueryExecutionValue() + * @model + * @generated + */ +public interface QueryExecutionValue extends DynamicValue { +} // QueryExecutionValue diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeToApply.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeToApply.java index 7b88d3ae704..3c0b28aab18 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeToApply.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeToApply.java @@ -1,12 +1,19 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EObject; /** @@ -20,6 +27,7 @@ import org.eclipse.emf.ecore.EObject; *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply#getStereotypeQualifiedName Stereotype Qualified Name}
  • *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply#isUpdateName Update Name}
  • *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply#getRequiredProfiles Required Profiles}
  • + *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply#getFeaturesToSet Features To Set}
  • * *

    * @@ -39,7 +47,7 @@ public interface StereotypeToApply extends EObject { * @return the value of the 'Stereotype Qualified Name' attribute. * @see #setStereotypeQualifiedName(String) * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getStereotypeToApply_StereotypeQualifiedName() - * @model dataType="types.String" + * @model * @generated */ String getStereotypeQualifiedName(); @@ -65,7 +73,7 @@ public interface StereotypeToApply extends EObject { * @return the value of the 'Update Name' attribute. * @see #setUpdateName(boolean) * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getStereotypeToApply_UpdateName() - * @model dataType="types.Boolean" + * @model * @generated */ boolean isUpdateName(); @@ -96,4 +104,20 @@ public interface StereotypeToApply extends EObject { */ EList getRequiredProfiles(); + /** + * Returns the value of the 'Features To Set' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet}. + * + *

    + * If the meaning of the 'Features To Set' containment reference list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Features To Set' containment reference list. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getStereotypeToApply_FeaturesToSet() + * @model containment="true" + * @generated + */ + EList getFeaturesToSet(); + } // StereotypeToApply diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationFactoryImpl.java index 0a76d1d35fc..c56b5e2581a 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationFactoryImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationFactoryImpl.java @@ -1,20 +1,26 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.impl.EFactoryImpl; + import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationFactory; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.*; /** * @@ -31,7 +37,7 @@ public class ApplyStereotypeActionConfigurationFactoryImpl extends EFactoryImpl */ public static ApplyStereotypeActionConfigurationFactory init() { try { - ApplyStereotypeActionConfigurationFactory theApplyStereotypeActionConfigurationFactory = (ApplyStereotypeActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/diagram/types/applystereotypeactionconfiguration/0.7"); + ApplyStereotypeActionConfigurationFactory theApplyStereotypeActionConfigurationFactory = (ApplyStereotypeActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(ApplyStereotypeActionConfigurationPackage.eNS_URI); if (theApplyStereotypeActionConfigurationFactory != null) { return theApplyStereotypeActionConfigurationFactory; } @@ -62,6 +68,10 @@ public class ApplyStereotypeActionConfigurationFactoryImpl extends EFactoryImpl switch (eClass.getClassifierID()) { case ApplyStereotypeActionConfigurationPackage.APPLY_STEREOTYPE_ACTION_CONFIGURATION: return createApplyStereotypeActionConfiguration(); case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY: return createStereotypeToApply(); + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET: return createFeatureToSet(); + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE: return createListValue(); + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE: return createConstantValue(); + case ApplyStereotypeActionConfigurationPackage.QUERY_EXECUTION_VALUE: return createQueryExecutionValue(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -87,6 +97,46 @@ public class ApplyStereotypeActionConfigurationFactoryImpl extends EFactoryImpl return stereotypeToApply; } + /** + * + * + * @generated + */ + public FeatureToSet createFeatureToSet() { + FeatureToSetImpl featureToSet = new FeatureToSetImpl(); + return featureToSet; + } + + /** + * + * + * @generated + */ + public ListValue createListValue() { + ListValueImpl listValue = new ListValueImpl(); + return listValue; + } + + /** + * + * + * @generated + */ + public ConstantValue createConstantValue() { + ConstantValueImpl constantValue = new ConstantValueImpl(); + return constantValue; + } + + /** + * + * + * @generated + */ + public QueryExecutionValue createQueryExecutionValue() { + QueryExecutionValueImpl queryExecutionValue = new QueryExecutionValueImpl(); + return queryExecutionValue; + } + /** * * diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationImpl.java index 9f37b4e12d2..014988c5797 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationImpl.java @@ -1,20 +1,31 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.papyrus.infra.extendedtypes.impl.PostActionConfigurationImpl; + +import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl; + import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; @@ -32,7 +43,7 @@ import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfigur * * @generated */ -public class ApplyStereotypeActionConfigurationImpl extends PostActionConfigurationImpl implements ApplyStereotypeActionConfiguration { +public class ApplyStereotypeActionConfigurationImpl extends SemanticActionConfigurationImpl implements ApplyStereotypeActionConfiguration { /** * The cached value of the '{@link #getStereotypesToApply() Stereotypes To Apply}' containment reference list. * diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java index 43d5202357a..5e690c01a8f 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java @@ -1,8 +1,14 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; @@ -11,13 +17,23 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage; + import org.eclipse.emf.ecore.impl.EPackageImpl; + import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationFactory; import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.DynamicValue; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.QueryExecutionValue; import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; -import org.eclipse.uml2.types.TypesPackage; + +import org.eclipse.uml2.uml.UMLPackage; /** * @@ -40,6 +56,48 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl */ private EClass stereotypeToApplyEClass = null; + /** + * + * + * @generated + */ + private EClass featureToSetEClass = null; + + /** + * + * + * @generated + */ + private EClass featureValueEClass = null; + + /** + * + * + * @generated + */ + private EClass listValueEClass = null; + + /** + * + * + * @generated + */ + private EClass constantValueEClass = null; + + /** + * + * + * @generated + */ + private EClass dynamicValueEClass = null; + + /** + * + * + * @generated + */ + private EClass queryExecutionValueEClass = null; + /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package @@ -88,7 +146,7 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl // Initialize simple dependencies ExtendedtypesPackage.eINSTANCE.eClass(); - TypesPackage.eINSTANCE.eClass(); + UMLPackage.eINSTANCE.eClass(); // Create package meta-data objects theApplyStereotypeActionConfigurationPackage.createPackageContents(); @@ -159,6 +217,105 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl return (EAttribute)stereotypeToApplyEClass.getEStructuralFeatures().get(2); } + /** + * + * + * @generated + */ + public EReference getStereotypeToApply_FeaturesToSet() { + return (EReference)stereotypeToApplyEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getFeatureToSet() { + return featureToSetEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFeatureToSet_FeatureName() { + return (EAttribute)featureToSetEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFeatureToSet_Value() { + return (EReference)featureToSetEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFeatureValue() { + return featureValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getListValue() { + return listValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getListValue_Values() { + return (EReference)listValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getConstantValue() { + return constantValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getConstantValue_ValueInstance() { + return (EReference)constantValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDynamicValue() { + return dynamicValueEClass; + } + + /** + * + * + * @generated + */ + public EClass getQueryExecutionValue() { + return queryExecutionValueEClass; + } + /** * * @@ -194,6 +351,23 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl createEAttribute(stereotypeToApplyEClass, STEREOTYPE_TO_APPLY__STEREOTYPE_QUALIFIED_NAME); createEAttribute(stereotypeToApplyEClass, STEREOTYPE_TO_APPLY__UPDATE_NAME); createEAttribute(stereotypeToApplyEClass, STEREOTYPE_TO_APPLY__REQUIRED_PROFILES); + createEReference(stereotypeToApplyEClass, STEREOTYPE_TO_APPLY__FEATURES_TO_SET); + + featureToSetEClass = createEClass(FEATURE_TO_SET); + createEAttribute(featureToSetEClass, FEATURE_TO_SET__FEATURE_NAME); + createEReference(featureToSetEClass, FEATURE_TO_SET__VALUE); + + featureValueEClass = createEClass(FEATURE_VALUE); + + listValueEClass = createEClass(LIST_VALUE); + createEReference(listValueEClass, LIST_VALUE__VALUES); + + constantValueEClass = createEClass(CONSTANT_VALUE); + createEReference(constantValueEClass, CONSTANT_VALUE__VALUE_INSTANCE); + + dynamicValueEClass = createEClass(DYNAMIC_VALUE); + + queryExecutionValueEClass = createEClass(QUERY_EXECUTION_VALUE); } /** @@ -221,24 +395,45 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl // Obtain other dependent packages ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); - TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes - applyStereotypeActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getPostActionConfiguration()); + applyStereotypeActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration()); + listValueEClass.getESuperTypes().add(this.getFeatureValue()); + constantValueEClass.getESuperTypes().add(this.getFeatureValue()); + dynamicValueEClass.getESuperTypes().add(this.getFeatureValue()); + queryExecutionValueEClass.getESuperTypes().add(this.getDynamicValue()); // Initialize classes and features; add operations and parameters initEClass(applyStereotypeActionConfigurationEClass, ApplyStereotypeActionConfiguration.class, "ApplyStereotypeActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getApplyStereotypeActionConfiguration_StereotypesToApply(), this.getStereotypeToApply(), null, "stereotypesToApply", null, 0, -1, ApplyStereotypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(stereotypeToApplyEClass, StereotypeToApply.class, "StereotypeToApply", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getStereotypeToApply_StereotypeQualifiedName(), theTypesPackage.getString(), "stereotypeQualifiedName", null, 0, 1, StereotypeToApply.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getStereotypeToApply_UpdateName(), theTypesPackage.getBoolean(), "updateName", null, 0, 1, StereotypeToApply.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getStereotypeToApply_StereotypeQualifiedName(), ecorePackage.getEString(), "stereotypeQualifiedName", null, 0, 1, StereotypeToApply.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getStereotypeToApply_UpdateName(), ecorePackage.getEBoolean(), "updateName", null, 0, 1, StereotypeToApply.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getStereotypeToApply_RequiredProfiles(), theEcorePackage.getEString(), "requiredProfiles", null, 1, -1, StereotypeToApply.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getStereotypeToApply_FeaturesToSet(), this.getFeatureToSet(), null, "featuresToSet", null, 0, -1, StereotypeToApply.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(featureToSetEClass, FeatureToSet.class, "FeatureToSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFeatureToSet_FeatureName(), ecorePackage.getEString(), "featureName", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFeatureToSet_Value(), this.getFeatureValue(), null, "value", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(featureValueEClass, FeatureValue.class, "FeatureValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(listValueEClass, ListValue.class, "ListValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getListValue_Values(), this.getFeatureValue(), null, "values", null, 0, -1, ListValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(constantValueEClass, ConstantValue.class, "ConstantValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConstantValue_ValueInstance(), theUMLPackage.getValueSpecification(), null, "valueInstance", null, 0, 1, ConstantValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dynamicValueEClass, DynamicValue.class, "DynamicValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(queryExecutionValueEClass, QueryExecutionValue.class, "QueryExecutionValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ConstantValueImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ConstantValueImpl.java new file mode 100644 index 00000000000..1731f3926b2 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ConstantValueImpl.java @@ -0,0 +1,186 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue; + +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * + * An implementation of the model object 'Constant Value'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ConstantValueImpl#getValueInstance Value Instance}
    • + *
    + *

    + * + * @generated + */ +public class ConstantValueImpl extends FeatureValueImpl implements ConstantValue { + /** + * The cached value of the '{@link #getValueInstance() Value Instance}' containment reference. + * + * + * @see #getValueInstance() + * @generated + * @ordered + */ + protected ValueSpecification valueInstance; + + /** + * + * + * @generated + */ + protected ConstantValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeActionConfigurationPackage.Literals.CONSTANT_VALUE; + } + + /** + * + * + * @generated + */ + public ValueSpecification getValueInstance() { + return valueInstance; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValueInstance(ValueSpecification newValueInstance, NotificationChain msgs) { + ValueSpecification oldValueInstance = valueInstance; + valueInstance = newValueInstance; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, oldValueInstance, newValueInstance); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setValueInstance(ValueSpecification newValueInstance) { + if (newValueInstance != valueInstance) { + NotificationChain msgs = null; + if (valueInstance != null) + msgs = ((InternalEObject)valueInstance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, null, msgs); + if (newValueInstance != null) + msgs = ((InternalEObject)newValueInstance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, null, msgs); + msgs = basicSetValueInstance(newValueInstance, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE, newValueInstance, newValueInstance)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + return basicSetValueInstance(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + return getValueInstance(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + setValueInstance((ValueSpecification)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + setValueInstance((ValueSpecification)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE__VALUE_INSTANCE: + return valueInstance != null; + } + return super.eIsSet(featureID); + } + +} //ConstantValueImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/DynamicValueImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/DynamicValueImpl.java new file mode 100644 index 00000000000..fa1b00f649f --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/DynamicValueImpl.java @@ -0,0 +1,49 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.DynamicValue; + +/** + * + * An implementation of the model object 'Dynamic Value'. + * + *

    + *

    + * + * @generated + */ +public abstract class DynamicValueImpl extends FeatureValueImpl implements DynamicValue { + /** + * + * + * @generated + */ + protected DynamicValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeActionConfigurationPackage.Literals.DYNAMIC_VALUE; + } + +} //DynamicValueImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java new file mode 100644 index 00000000000..40839a13ea0 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java @@ -0,0 +1,254 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue; + +/** + * + * An implementation of the model object 'Feature To Set'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl#getFeatureName Feature Name}
    • + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl#getValue Value}
    • + *
    + *

    + * + * @generated + */ +public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet { + /** + * The default value of the '{@link #getFeatureName() Feature Name}' attribute. + * + * + * @see #getFeatureName() + * @generated + * @ordered + */ + protected static final String FEATURE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFeatureName() Feature Name}' attribute. + * + * + * @see #getFeatureName() + * @generated + * @ordered + */ + protected String featureName = FEATURE_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getValue() Value}' containment reference. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected FeatureValue value; + + /** + * + * + * @generated + */ + protected FeatureToSetImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeActionConfigurationPackage.Literals.FEATURE_TO_SET; + } + + /** + * + * + * @generated + */ + public String getFeatureName() { + return featureName; + } + + /** + * + * + * @generated + */ + public void setFeatureName(String newFeatureName) { + String oldFeatureName = featureName; + featureName = newFeatureName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME, oldFeatureName, featureName)); + } + + /** + * + * + * @generated + */ + public FeatureValue getValue() { + return value; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValue(FeatureValue newValue, NotificationChain msgs) { + FeatureValue oldValue = value; + value = newValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE, oldValue, newValue); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setValue(FeatureValue newValue) { + if (newValue != value) { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE, newValue, newValue)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE: + return basicSetValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + return getFeatureName(); + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + setFeatureName((String)newValue); + return; + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE: + setValue((FeatureValue)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + setFeatureName(FEATURE_NAME_EDEFAULT); + return; + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE: + setValue((FeatureValue)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName); + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE: + return value != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (featureName: "); + result.append(featureName); + result.append(')'); + return result.toString(); + } + +} //FeatureToSetImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureValueImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureValueImpl.java new file mode 100644 index 00000000000..d9dd542d3ce --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureValueImpl.java @@ -0,0 +1,51 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue; + +/** + * + * An implementation of the model object 'Feature Value'. + * + *

    + *

    + * + * @generated + */ +public abstract class FeatureValueImpl extends EObjectImpl implements FeatureValue { + /** + * + * + * @generated + */ + protected FeatureValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeActionConfigurationPackage.Literals.FEATURE_VALUE; + } + +} //FeatureValueImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ListValueImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ListValueImpl.java new file mode 100644 index 00000000000..a146cf7cff8 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ListValueImpl.java @@ -0,0 +1,160 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue; + +/** + * + * An implementation of the model object 'List Value'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.ListValueImpl#getValues Values}
    • + *
    + *

    + * + * @generated + */ +public class ListValueImpl extends FeatureValueImpl implements ListValue { + /** + * The cached value of the '{@link #getValues() Values}' containment reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected ListValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeActionConfigurationPackage.Literals.LIST_VALUE; + } + + /** + * + * + * @generated + */ + public EList getValues() { + if (values == null) { + values = new EObjectContainmentEList(FeatureValue.class, this, ApplyStereotypeActionConfigurationPackage.LIST_VALUE__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ListValueImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/QueryExecutionValueImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/QueryExecutionValueImpl.java new file mode 100644 index 00000000000..8696c7348c5 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/QueryExecutionValueImpl.java @@ -0,0 +1,49 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.QueryExecutionValue; + +/** + * + * An implementation of the model object 'Query Execution Value'. + * + *

    + *

    + * + * @generated + */ +public class QueryExecutionValueImpl extends DynamicValueImpl implements QueryExecutionValue { + /** + * + * + * @generated + */ + protected QueryExecutionValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeActionConfigurationPackage.Literals.QUERY_EXECUTION_VALUE; + } + +} //QueryExecutionValueImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/StereotypeToApplyImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/StereotypeToApplyImpl.java index 33c8472e7da..1e06ded0970 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/StereotypeToApplyImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/StereotypeToApplyImpl.java @@ -1,20 +1,36 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl; import java.util.Collection; import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; + import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet; import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; /** @@ -27,6 +43,7 @@ import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfigur *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.StereotypeToApplyImpl#getStereotypeQualifiedName Stereotype Qualified Name}
  • *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.StereotypeToApplyImpl#isUpdateName Update Name}
  • *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.StereotypeToApplyImpl#getRequiredProfiles Required Profiles}
  • + *
  • {@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.StereotypeToApplyImpl#getFeaturesToSet Features To Set}
  • * *

    * @@ -83,6 +100,16 @@ public class StereotypeToApplyImpl extends EObjectImpl implements StereotypeToAp */ protected EList requiredProfiles; + /** + * The cached value of the '{@link #getFeaturesToSet() Features To Set}' containment reference list. + * + * + * @see #getFeaturesToSet() + * @generated + * @ordered + */ + protected EList featuresToSet; + /** * * @@ -156,6 +183,32 @@ public class StereotypeToApplyImpl extends EObjectImpl implements StereotypeToAp return requiredProfiles; } + /** + * + * + * @generated + */ + public EList getFeaturesToSet() { + if (featuresToSet == null) { + featuresToSet = new EObjectContainmentEList(FeatureToSet.class, this, ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__FEATURES_TO_SET); + } + return featuresToSet; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__FEATURES_TO_SET: + return ((InternalEList)getFeaturesToSet()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + /** * * @@ -170,6 +223,8 @@ public class StereotypeToApplyImpl extends EObjectImpl implements StereotypeToAp return isUpdateName(); case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__REQUIRED_PROFILES: return getRequiredProfiles(); + case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__FEATURES_TO_SET: + return getFeaturesToSet(); } return super.eGet(featureID, resolve, coreType); } @@ -193,6 +248,10 @@ public class StereotypeToApplyImpl extends EObjectImpl implements StereotypeToAp getRequiredProfiles().clear(); getRequiredProfiles().addAll((Collection)newValue); return; + case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__FEATURES_TO_SET: + getFeaturesToSet().clear(); + getFeaturesToSet().addAll((Collection)newValue); + return; } super.eSet(featureID, newValue); } @@ -214,6 +273,9 @@ public class StereotypeToApplyImpl extends EObjectImpl implements StereotypeToAp case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__REQUIRED_PROFILES: getRequiredProfiles().clear(); return; + case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__FEATURES_TO_SET: + getFeaturesToSet().clear(); + return; } super.eUnset(featureID); } @@ -232,6 +294,8 @@ public class StereotypeToApplyImpl extends EObjectImpl implements StereotypeToAp return updateName != UPDATE_NAME_EDEFAULT; case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__REQUIRED_PROFILES: return requiredProfiles != null && !requiredProfiles.isEmpty(); + case ApplyStereotypeActionConfigurationPackage.STEREOTYPE_TO_APPLY__FEATURES_TO_SET: + return featuresToSet != null && !featuresToSet.isEmpty(); } return super.eIsSet(featureID); } diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationAdapterFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationAdapterFactory.java index c22ffab8a88..78fb542f02e 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationAdapterFactory.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationAdapterFactory.java @@ -1,20 +1,29 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; + import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + import org.eclipse.emf.ecore.EObject; + import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.*; /** * @@ -81,12 +90,40 @@ public class ApplyStereotypeActionConfigurationAdapterFactory extends AdapterFac return createStereotypeToApplyAdapter(); } @Override + public Adapter caseFeatureToSet(FeatureToSet object) { + return createFeatureToSetAdapter(); + } + @Override + public Adapter caseFeatureValue(FeatureValue object) { + return createFeatureValueAdapter(); + } + @Override + public Adapter caseListValue(ListValue object) { + return createListValueAdapter(); + } + @Override + public Adapter caseConstantValue(ConstantValue object) { + return createConstantValueAdapter(); + } + @Override + public Adapter caseDynamicValue(DynamicValue object) { + return createDynamicValueAdapter(); + } + @Override + public Adapter caseQueryExecutionValue(QueryExecutionValue object) { + return createQueryExecutionValueAdapter(); + } + @Override + public Adapter caseConfigurationElement(ConfigurationElement object) { + return createConfigurationElementAdapter(); + } + @Override public Adapter caseActionConfiguration(ActionConfiguration object) { return createActionConfigurationAdapter(); } @Override - public Adapter casePostActionConfiguration(PostActionConfiguration object) { - return createPostActionConfigurationAdapter(); + public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return createSemanticActionConfigurationAdapter(); } @Override public Adapter defaultCase(EObject object) { @@ -136,6 +173,104 @@ public class ApplyStereotypeActionConfigurationAdapterFactory extends AdapterFac return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet Feature To Set}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet + * @generated + */ + public Adapter createFeatureToSetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue Feature Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureValue + * @generated + */ + public Adapter createFeatureValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue List Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ListValue + * @generated + */ + public Adapter createListValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue Constant Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ConstantValue + * @generated + */ + public Adapter createConstantValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.DynamicValue Dynamic Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.DynamicValue + * @generated + */ + public Adapter createDynamicValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.QueryExecutionValue Query Execution Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.QueryExecutionValue + * @generated + */ + public Adapter createQueryExecutionValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + public Adapter createConfigurationElementAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. * @@ -151,16 +286,16 @@ public class ApplyStereotypeActionConfigurationAdapterFactory extends AdapterFac } /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration Post Action Configuration}'. + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration Semantic Action Configuration}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @see org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration * @generated */ - public Adapter createPostActionConfigurationAdapter() { + public Adapter createSemanticActionConfigurationAdapter() { return null; } diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceFactoryImpl.java index 3cb6577f05c..6e9962d1cda 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceFactoryImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceFactoryImpl.java @@ -1,14 +1,23 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util; import org.eclipse.emf.common.util.URI; + import org.eclipse.emf.ecore.resource.Resource; + import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + import org.eclipse.emf.ecore.xmi.XMLResource; /** diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceImpl.java index 7c53034488e..98b84712ea9 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationResourceImpl.java @@ -1,12 +1,19 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util; import org.eclipse.emf.common.util.URI; + import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; /** diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationSwitch.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationSwitch.java index a91ade640c1..7a54b6afa03 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationSwitch.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationSwitch.java @@ -1,19 +1,27 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.util.Switch; + import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.PostActionConfiguration; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.*; /** * @@ -75,8 +83,9 @@ public class ApplyStereotypeActionConfigurationSwitch extends Switch { case ApplyStereotypeActionConfigurationPackage.APPLY_STEREOTYPE_ACTION_CONFIGURATION: { ApplyStereotypeActionConfiguration applyStereotypeActionConfiguration = (ApplyStereotypeActionConfiguration)theEObject; T result = caseApplyStereotypeActionConfiguration(applyStereotypeActionConfiguration); - if (result == null) result = casePostActionConfiguration(applyStereotypeActionConfiguration); + if (result == null) result = caseSemanticActionConfiguration(applyStereotypeActionConfiguration); if (result == null) result = caseActionConfiguration(applyStereotypeActionConfiguration); + if (result == null) result = caseConfigurationElement(applyStereotypeActionConfiguration); if (result == null) result = defaultCase(theEObject); return result; } @@ -86,6 +95,47 @@ public class ApplyStereotypeActionConfigurationSwitch extends Switch { if (result == null) result = defaultCase(theEObject); return result; } + case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET: { + FeatureToSet featureToSet = (FeatureToSet)theEObject; + T result = caseFeatureToSet(featureToSet); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplyStereotypeActionConfigurationPackage.FEATURE_VALUE: { + FeatureValue featureValue = (FeatureValue)theEObject; + T result = caseFeatureValue(featureValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplyStereotypeActionConfigurationPackage.LIST_VALUE: { + ListValue listValue = (ListValue)theEObject; + T result = caseListValue(listValue); + if (result == null) result = caseFeatureValue(listValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplyStereotypeActionConfigurationPackage.CONSTANT_VALUE: { + ConstantValue constantValue = (ConstantValue)theEObject; + T result = caseConstantValue(constantValue); + if (result == null) result = caseFeatureValue(constantValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplyStereotypeActionConfigurationPackage.DYNAMIC_VALUE: { + DynamicValue dynamicValue = (DynamicValue)theEObject; + T result = caseDynamicValue(dynamicValue); + if (result == null) result = caseFeatureValue(dynamicValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ApplyStereotypeActionConfigurationPackage.QUERY_EXECUTION_VALUE: { + QueryExecutionValue queryExecutionValue = (QueryExecutionValue)theEObject; + T result = caseQueryExecutionValue(queryExecutionValue); + if (result == null) result = caseDynamicValue(queryExecutionValue); + if (result == null) result = caseFeatureValue(queryExecutionValue); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -120,6 +170,111 @@ public class ApplyStereotypeActionConfigurationSwitch extends Switch { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Feature To Set'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Feature To Set'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFeatureToSet(FeatureToSet object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Feature Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Feature Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFeatureValue(FeatureValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'List Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'List Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseListValue(ListValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Constant Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Constant Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConstantValue(ConstantValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dynamic Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dynamic Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDynamicValue(DynamicValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Query Execution Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Query Execution Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseQueryExecutionValue(QueryExecutionValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationElement(ConfigurationElement object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Action Configuration'. * @@ -136,17 +291,17 @@ public class ApplyStereotypeActionConfigurationSwitch extends Switch { } /** - * Returns the result of interpreting the object as an instance of 'Post Action Configuration'. + * Returns the result of interpreting the object as an instance of 'Semantic Action Configuration'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Post Action Configuration'. + * @return the result of interpreting the object as an instance of 'Semantic Action Configuration'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T casePostActionConfiguration(PostActionConfiguration object) { + public T caseSemanticActionConfiguration(SemanticActionConfiguration object) { return null; } diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationXMLProcessor.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationXMLProcessor.java index 70e5c5addf7..84aef097589 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationXMLProcessor.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/util/ApplyStereotypeActionConfigurationXMLProcessor.java @@ -1,16 +1,25 @@ /** - * - * - * - * $Id$ + * 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: + * CEA LIST - Initial API and implementation */ package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util; import java.util.Map; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.resource.Resource; + import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage; /** diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java new file mode 100644 index 00000000000..ba44c430e1d --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java @@ -0,0 +1,87 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; + +/** + * + * A representation of the model object 'Invariant Stereotype Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName Stereotype Qualified Name}
    • + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile Required Profile}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration() + * @model + * @generated + */ +public interface InvariantStereotypeConfiguration extends InvariantRuleConfiguration { + + /** + * Returns the value of the 'Stereotype Qualified Name' attribute. + * + *

    + * If the meaning of the 'Stereotype Qualified Name' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Stereotype Qualified Name' attribute. + * @see #setStereotypeQualifiedName(String) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_StereotypeQualifiedName() + * @model required="true" + * @generated + */ + String getStereotypeQualifiedName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName Stereotype Qualified Name}' attribute. + * + * + * @param value the new value of the 'Stereotype Qualified Name' attribute. + * @see #getStereotypeQualifiedName() + * @generated + */ + void setStereotypeQualifiedName(String value); + + /** + * Returns the value of the 'Required Profile' attribute. + * + *

    + * If the meaning of the 'Required Profile' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Required Profile' attribute. + * @see #setRequiredProfile(String) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_RequiredProfile() + * @model + * @generated + */ + String getRequiredProfile(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile Required Profile}' attribute. + * + * + * @param value the new value of the 'Required Profile' attribute. + * @see #getRequiredProfile() + * @generated + */ + void setRequiredProfile(String value); +} // InvariantStereotypeConfiguration diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationFactory.java new file mode 100644 index 00000000000..a7cf890f7ba --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationFactory.java @@ -0,0 +1,52 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage + * @generated + */ +public interface InvariantStereotypeConfigurationFactory extends EFactory { + + /** + * The singleton instance of the factory. + * + * + * @generated + */ + InvariantStereotypeConfigurationFactory eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Invariant Stereotype Configuration'. + * + * + * @return a new object of class 'Invariant Stereotype Configuration'. + * @generated + */ + InvariantStereotypeConfiguration createInvariantStereotypeConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + InvariantStereotypeConfigurationPackage getInvariantStereotypeConfigurationPackage(); +} //InvariantStereotypeConfigurationFactory diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java new file mode 100644 index 00000000000..7b173f379af --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java @@ -0,0 +1,198 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory + * @model kind="package" + * @generated + */ +public interface InvariantStereotypeConfigurationPackage extends EPackage { + + /** + * The package name. + * + * + * @generated + */ + String eNAME = "invariantstereotypeconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/stereotype/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "invariantstereotypeconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + InvariantStereotypeConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl Invariant Stereotype Configuration}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl#getInvariantStereotypeConfiguration() + * @generated + */ + int INVARIANT_STEREOTYPE_CONFIGURATION = 0; + + /** + * The feature id for the 'Stereotype Qualified Name' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Required Profile' attribute. + * + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Invariant Stereotype Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION_FEATURE_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Invariant Stereotype Configuration' class. + * + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION_OPERATION_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration Invariant Stereotype Configuration}'. + * + * + * @return the meta object for class 'Invariant Stereotype Configuration'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration + * @generated + */ + EClass getInvariantStereotypeConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName Stereotype Qualified Name}'. + * + * + * @return the meta object for the attribute 'Stereotype Qualified Name'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName() + * @see #getInvariantStereotypeConfiguration() + * @generated + */ + EAttribute getInvariantStereotypeConfiguration_StereotypeQualifiedName(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile Required Profile}'. + * + * + * @return the meta object for the attribute 'Required Profile'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile() + * @see #getInvariantStereotypeConfiguration() + * @generated + */ + EAttribute getInvariantStereotypeConfiguration_RequiredProfile(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + InvariantStereotypeConfigurationFactory getInvariantStereotypeConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl Invariant Stereotype Configuration}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl#getInvariantStereotypeConfiguration() + * @generated + */ + EClass INVARIANT_STEREOTYPE_CONFIGURATION = eINSTANCE.getInvariantStereotypeConfiguration(); + + /** + * The meta object literal for the 'Stereotype Qualified Name' attribute feature. + * + * + * @generated + */ + EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME = eINSTANCE.getInvariantStereotypeConfiguration_StereotypeQualifiedName(); + + /** + * The meta object literal for the 'Required Profile' attribute feature. + * + * + * @generated + */ + EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE = eINSTANCE.getInvariantStereotypeConfiguration_RequiredProfile(); + } +} //InvariantStereotypeConfigurationPackage diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationFactoryImpl.java new file mode 100644 index 00000000000..1baa6dd9c47 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationFactoryImpl.java @@ -0,0 +1,104 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class InvariantStereotypeConfigurationFactoryImpl extends EFactoryImpl implements InvariantStereotypeConfigurationFactory { + + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static InvariantStereotypeConfigurationFactory init() { + try { + InvariantStereotypeConfigurationFactory theInvariantStereotypeConfigurationFactory = (InvariantStereotypeConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(InvariantStereotypeConfigurationPackage.eNS_URI); + if(theInvariantStereotypeConfigurationFactory != null) { + return theInvariantStereotypeConfigurationFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new InvariantStereotypeConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public InvariantStereotypeConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch(eClass.getClassifierID()) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION: + return createInvariantStereotypeConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public InvariantStereotypeConfiguration createInvariantStereotypeConfiguration() { + InvariantStereotypeConfigurationImpl invariantStereotypeConfiguration = new InvariantStereotypeConfigurationImpl(); + return invariantStereotypeConfiguration; + } + + /** + * + * + * @generated + */ + public InvariantStereotypeConfigurationPackage getInvariantStereotypeConfigurationPackage() { + return (InvariantStereotypeConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static InvariantStereotypeConfigurationPackage getPackage() { + return InvariantStereotypeConfigurationPackage.eINSTANCE; + } +} //InvariantStereotypeConfigurationFactoryImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java new file mode 100644 index 00000000000..2ed19f821eb --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java @@ -0,0 +1,224 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * + * An implementation of the model object 'Invariant Stereotype Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#getStereotypeQualifiedName Stereotype Qualified Name}
    • + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#getRequiredProfile Required Profile}
    • + *
    + *

    + * + * @generated + */ +public class InvariantStereotypeConfigurationImpl extends InvariantRuleConfigurationImpl implements InvariantStereotypeConfiguration { + + /** + * The default value of the '{@link #getStereotypeQualifiedName() Stereotype Qualified Name}' attribute. + * + * + * @see #getStereotypeQualifiedName() + * @generated + * @ordered + */ + protected static final String STEREOTYPE_QUALIFIED_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStereotypeQualifiedName() Stereotype Qualified Name}' attribute. + * + * + * @see #getStereotypeQualifiedName() + * @generated + * @ordered + */ + protected String stereotypeQualifiedName = STEREOTYPE_QUALIFIED_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getRequiredProfile() Required Profile}' attribute. + * + * + * @see #getRequiredProfile() + * @generated + * @ordered + */ + protected static final String REQUIRED_PROFILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRequiredProfile() Required Profile}' attribute. + * + * + * @see #getRequiredProfile() + * @generated + * @ordered + */ + protected String requiredProfile = REQUIRED_PROFILE_EDEFAULT; + + /** + * + * + * @generated + */ + protected InvariantStereotypeConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantStereotypeConfigurationPackage.Literals.INVARIANT_STEREOTYPE_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getStereotypeQualifiedName() { + return stereotypeQualifiedName; + } + + /** + * + * + * @generated + */ + public void setStereotypeQualifiedName(String newStereotypeQualifiedName) { + String oldStereotypeQualifiedName = stereotypeQualifiedName; + stereotypeQualifiedName = newStereotypeQualifiedName; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME, oldStereotypeQualifiedName, stereotypeQualifiedName)); + } + + /** + * + * + * @generated + */ + public String getRequiredProfile() { + return requiredProfile; + } + + /** + * + * + * @generated + */ + public void setRequiredProfile(String newRequiredProfile) { + String oldRequiredProfile = requiredProfile; + requiredProfile = newRequiredProfile; + if(eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE, oldRequiredProfile, requiredProfile)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch(featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + return getStereotypeQualifiedName(); + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + return getRequiredProfile(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch(featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + setStereotypeQualifiedName((String)newValue); + return; + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + setRequiredProfile((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch(featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + setStereotypeQualifiedName(STEREOTYPE_QUALIFIED_NAME_EDEFAULT); + return; + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + setRequiredProfile(REQUIRED_PROFILE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch(featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + return STEREOTYPE_QUALIFIED_NAME_EDEFAULT == null ? stereotypeQualifiedName != null : !STEREOTYPE_QUALIFIED_NAME_EDEFAULT.equals(stereotypeQualifiedName); + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + return REQUIRED_PROFILE_EDEFAULT == null ? requiredProfile != null : !REQUIRED_PROFILE_EDEFAULT.equals(requiredProfile); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if(eIsProxy()) + return super.toString(); + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (stereotypeQualifiedName: "); + result.append(stereotypeQualifiedName); + result.append(", requiredProfile: "); + result.append(requiredProfile); + result.append(')'); + return result.toString(); + } +} //InvariantStereotypeConfigurationImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java new file mode 100644 index 00000000000..fb97d33de37 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java @@ -0,0 +1,193 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class InvariantStereotypeConfigurationPackageImpl extends EPackageImpl implements InvariantStereotypeConfigurationPackage { + + /** + * + * + * @generated + */ + private EClass invariantStereotypeConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private InvariantStereotypeConfigurationPackageImpl() { + super(eNS_URI, InvariantStereotypeConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link InvariantStereotypeConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static InvariantStereotypeConfigurationPackage init() { + if(isInited) + return (InvariantStereotypeConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(InvariantStereotypeConfigurationPackage.eNS_URI); + // Obtain or create and register package + InvariantStereotypeConfigurationPackageImpl theInvariantStereotypeConfigurationPackage = (InvariantStereotypeConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InvariantStereotypeConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InvariantStereotypeConfigurationPackageImpl()); + isInited = true; + // Initialize simple dependencies + InvariantSemanticTypeConfigurationPackage.eINSTANCE.eClass(); + // Create package meta-data objects + theInvariantStereotypeConfigurationPackage.createPackageContents(); + // Initialize created meta-data + theInvariantStereotypeConfigurationPackage.initializePackageContents(); + // Mark meta-data to indicate it can't be changed + theInvariantStereotypeConfigurationPackage.freeze(); + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(InvariantStereotypeConfigurationPackage.eNS_URI, theInvariantStereotypeConfigurationPackage); + return theInvariantStereotypeConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getInvariantStereotypeConfiguration() { + return invariantStereotypeConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getInvariantStereotypeConfiguration_StereotypeQualifiedName() { + return (EAttribute)invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getInvariantStereotypeConfiguration_RequiredProfile() { + return (EAttribute)invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public InvariantStereotypeConfigurationFactory getInvariantStereotypeConfigurationFactory() { + return (InvariantStereotypeConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if(isCreated) + return; + isCreated = true; + // Create classes and their features + invariantStereotypeConfigurationEClass = createEClass(INVARIANT_STEREOTYPE_CONFIGURATION); + createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME); + createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if(isInitialized) + return; + isInitialized = true; + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + // Obtain other dependent packages + InvariantSemanticTypeConfigurationPackage theInvariantSemanticTypeConfigurationPackage = (InvariantSemanticTypeConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(InvariantSemanticTypeConfigurationPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + // Create type parameters + // Set bounds for type parameters + // Add supertypes to classes + invariantStereotypeConfigurationEClass.getESuperTypes().add(theInvariantSemanticTypeConfigurationPackage.getInvariantRuleConfiguration()); + // Initialize classes, features, and operations; add parameters + initEClass(invariantStereotypeConfigurationEClass, InvariantStereotypeConfiguration.class, "InvariantStereotypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInvariantStereotypeConfiguration_StereotypeQualifiedName(), theEcorePackage.getEString(), "stereotypeQualifiedName", null, 1, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getInvariantStereotypeConfiguration_RequiredProfile(), theEcorePackage.getEString(), "requiredProfile", null, 0, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Create resource + createResource(eNS_URI); + } +} //InvariantStereotypeConfigurationPackageImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationAdapterFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationAdapterFactory.java new file mode 100644 index 00000000000..e8fd4010490 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationAdapterFactory.java @@ -0,0 +1,148 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage + * @generated + */ +public class InvariantStereotypeConfigurationAdapterFactory extends AdapterFactoryImpl { + + /** + * The cached model package. + * + * + * @generated + */ + protected static InvariantStereotypeConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public InvariantStereotypeConfigurationAdapterFactory() { + if(modelPackage == null) { + modelPackage = InvariantStereotypeConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if(object == modelPackage) { + return true; + } + if(object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected InvariantStereotypeConfigurationSwitch modelSwitch = new InvariantStereotypeConfigurationSwitch() { + + @Override + public Adapter caseInvariantStereotypeConfiguration(InvariantStereotypeConfiguration object) { + return createInvariantStereotypeConfigurationAdapter(); + } + + @Override + public Adapter caseInvariantRuleConfiguration(InvariantRuleConfiguration object) { + return createInvariantRuleConfigurationAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration Invariant Stereotype Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration + * @generated + */ + public Adapter createInvariantStereotypeConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration Invariant Rule Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration + * @generated + */ + public Adapter createInvariantRuleConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } +} //InvariantStereotypeConfigurationAdapterFactory diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..e1de23783d1 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceFactoryImpl.java @@ -0,0 +1,49 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util.InvariantStereotypeConfigurationResourceImpl + * @generated + */ +public class InvariantStereotypeConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public InvariantStereotypeConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new InvariantStereotypeConfigurationResourceImpl(uri); + return result; + } +} //InvariantStereotypeConfigurationResourceFactoryImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceImpl.java new file mode 100644 index 00000000000..b21fd66b978 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationResourceImpl.java @@ -0,0 +1,37 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util.InvariantStereotypeConfigurationResourceFactoryImpl + * @generated + */ +public class InvariantStereotypeConfigurationResourceImpl extends XMLResourceImpl { + + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public InvariantStereotypeConfigurationResourceImpl(URI uri) { + super(uri); + } +} //InvariantStereotypeConfigurationResourceImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationSwitch.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationSwitch.java new file mode 100644 index 00000000000..6a35e49cf2c --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationSwitch.java @@ -0,0 +1,140 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage + * @generated + */ +public class InvariantStereotypeConfigurationSwitch extends Switch { + + /** + * The cached model package + * + * + * @generated + */ + protected static InvariantStereotypeConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public InvariantStereotypeConfigurationSwitch() { + if(modelPackage == null) { + modelPackage = InvariantStereotypeConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch(classifierID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION: + { + InvariantStereotypeConfiguration invariantStereotypeConfiguration = (InvariantStereotypeConfiguration)theEObject; + T result = caseInvariantStereotypeConfiguration(invariantStereotypeConfiguration); + if(result == null) + result = caseInvariantRuleConfiguration(invariantStereotypeConfiguration); + if(result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Invariant Stereotype Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Invariant Stereotype Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInvariantStereotypeConfiguration(InvariantStereotypeConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Invariant Rule Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Invariant Rule Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInvariantRuleConfiguration(InvariantRuleConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } +} //InvariantStereotypeConfigurationSwitch diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationXMLProcessor.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationXMLProcessor.java new file mode 100644 index 00000000000..5c198dbad62 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/util/InvariantStereotypeConfigurationXMLProcessor.java @@ -0,0 +1,56 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class InvariantStereotypeConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public InvariantStereotypeConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + InvariantStereotypeConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the InvariantStereotypeConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if(registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new InvariantStereotypeConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new InvariantStereotypeConfigurationResourceFactoryImpl()); + } + return registrations; + } +} //InvariantStereotypeConfigurationXMLProcessor diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java new file mode 100644 index 00000000000..36a150cd7ff --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java @@ -0,0 +1,69 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +/** + * + * A representation of the model object 'Set Type Action Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes Valid Types}
    • + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes Creation Types}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration() + * @model + * @generated + */ +public interface SetTypeActionConfiguration extends SemanticActionConfiguration { + /** + * Returns the value of the 'Valid Types' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

    + * If the meaning of the 'Valid Types' attribute list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Valid Types' attribute list. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration_ValidTypes() + * @model + * @generated + */ + EList getValidTypes(); + + /** + * Returns the value of the 'Creation Types' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

    + * If the meaning of the 'Creation Types' attribute list isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Creation Types' attribute list. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration_CreationTypes() + * @model + * @generated + */ + EList getCreationTypes(); + +} // SetTypeActionConfiguration diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java new file mode 100644 index 00000000000..436cfde4572 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java @@ -0,0 +1,52 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage + * @generated + */ +public interface SetTypeActionConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + SetTypeActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Set Type Action Configuration'. + * + * + * @return a new object of class 'Set Type Action Configuration'. + * @generated + */ + SetTypeActionConfiguration createSetTypeActionConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + SetTypeActionConfigurationPackage getSetTypeActionConfigurationPackage(); + +} //SetTypeActionConfigurationFactory diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java new file mode 100644 index 00000000000..7f2c4924d58 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java @@ -0,0 +1,226 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationFactory + * @model kind="package" + * @generated + */ +public interface SetTypeActionConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "settypeactionconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "settypeactionconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + SetTypeActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl Set Type Action Configuration}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl#getSetTypeActionConfiguration() + * @generated + */ + int SET_TYPE_ACTION_CONFIGURATION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION; + + /** + * The feature id for the 'Identifier' attribute. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER; + + /** + * The feature id for the 'Icon Entry' containment reference. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY; + + /** + * The feature id for the 'Valid Types' attribute list. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Creation Types' attribute list. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Set Type Action Configuration' class. + * + * + * @generated + * @ordered + */ + int SET_TYPE_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration Set Type Action Configuration}'. + * + * + * @return the meta object for class 'Set Type Action Configuration'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration + * @generated + */ + EClass getSetTypeActionConfiguration(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes Valid Types}'. + * + * + * @return the meta object for the attribute list 'Valid Types'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes() + * @see #getSetTypeActionConfiguration() + * @generated + */ + EAttribute getSetTypeActionConfiguration_ValidTypes(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes Creation Types}'. + * + * + * @return the meta object for the attribute list 'Creation Types'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes() + * @see #getSetTypeActionConfiguration() + * @generated + */ + EAttribute getSetTypeActionConfiguration_CreationTypes(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + SetTypeActionConfigurationFactory getSetTypeActionConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl Set Type Action Configuration}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl#getSetTypeActionConfiguration() + * @generated + */ + EClass SET_TYPE_ACTION_CONFIGURATION = eINSTANCE.getSetTypeActionConfiguration(); + + /** + * The meta object literal for the 'Valid Types' attribute list feature. + * + * + * @generated + */ + EAttribute SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES = eINSTANCE.getSetTypeActionConfiguration_ValidTypes(); + + /** + * The meta object literal for the 'Creation Types' attribute list feature. + * + * + * @generated + */ + EAttribute SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES = eINSTANCE.getSetTypeActionConfiguration_CreationTypes(); + + } + +} //SetTypeActionConfigurationPackage diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java new file mode 100644 index 00000000000..88b9fcb3b9d --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java @@ -0,0 +1,105 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class SetTypeActionConfigurationFactoryImpl extends EFactoryImpl implements SetTypeActionConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static SetTypeActionConfigurationFactory init() { + try { + SetTypeActionConfigurationFactory theSetTypeActionConfigurationFactory = (SetTypeActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(SetTypeActionConfigurationPackage.eNS_URI); + if (theSetTypeActionConfigurationFactory != null) { + return theSetTypeActionConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new SetTypeActionConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public SetTypeActionConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION: return createSetTypeActionConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SetTypeActionConfiguration createSetTypeActionConfiguration() { + SetTypeActionConfigurationImpl setTypeActionConfiguration = new SetTypeActionConfigurationImpl(); + return setTypeActionConfiguration; + } + + /** + * + * + * @generated + */ + public SetTypeActionConfigurationPackage getSetTypeActionConfigurationPackage() { + return (SetTypeActionConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static SetTypeActionConfigurationPackage getPackage() { + return SetTypeActionConfigurationPackage.eINSTANCE; + } + +} //SetTypeActionConfigurationFactoryImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java new file mode 100644 index 00000000000..a368e94c791 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java @@ -0,0 +1,195 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl; + +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage; + +/** + * + * An implementation of the model object 'Set Type Action Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl#getValidTypes Valid Types}
    • + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl#getCreationTypes Creation Types}
    • + *
    + *

    + * + * @generated + */ +public class SetTypeActionConfigurationImpl extends SemanticActionConfigurationImpl implements SetTypeActionConfiguration { + /** + * The cached value of the '{@link #getValidTypes() Valid Types}' attribute list. + * + * + * @see #getValidTypes() + * @generated + * @ordered + */ + protected EList validTypes; + + /** + * The cached value of the '{@link #getCreationTypes() Creation Types}' attribute list. + * + * + * @see #getCreationTypes() + * @generated + * @ordered + */ + protected EList creationTypes; + + /** + * + * + * @generated + */ + protected SetTypeActionConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SetTypeActionConfigurationPackage.Literals.SET_TYPE_ACTION_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getValidTypes() { + if (validTypes == null) { + validTypes = new EDataTypeUniqueEList(String.class, this, SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES); + } + return validTypes; + } + + /** + * + * + * @generated + */ + public EList getCreationTypes() { + if (creationTypes == null) { + creationTypes = new EDataTypeUniqueEList(String.class, this, SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES); + } + return creationTypes; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES: + return getValidTypes(); + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES: + return getCreationTypes(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES: + getValidTypes().clear(); + getValidTypes().addAll((Collection)newValue); + return; + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES: + getCreationTypes().clear(); + getCreationTypes().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES: + getValidTypes().clear(); + return; + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES: + getCreationTypes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES: + return validTypes != null && !validTypes.isEmpty(); + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES: + return creationTypes != null && !creationTypes.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (validTypes: "); + result.append(validTypes); + result.append(", creationTypes: "); + result.append(creationTypes); + result.append(')'); + return result.toString(); + } + +} //SetTypeActionConfigurationImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java new file mode 100644 index 00000000000..431da09544b --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java @@ -0,0 +1,209 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationFactory; +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class SetTypeActionConfigurationPackageImpl extends EPackageImpl implements SetTypeActionConfigurationPackage { + /** + * + * + * @generated + */ + private EClass setTypeActionConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private SetTypeActionConfigurationPackageImpl() { + super(eNS_URI, SetTypeActionConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link SetTypeActionConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static SetTypeActionConfigurationPackage init() { + if (isInited) return (SetTypeActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(SetTypeActionConfigurationPackage.eNS_URI); + + // Obtain or create and register package + SetTypeActionConfigurationPackageImpl theSetTypeActionConfigurationPackage = (SetTypeActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SetTypeActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SetTypeActionConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ExtendedtypesPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theSetTypeActionConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theSetTypeActionConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theSetTypeActionConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(SetTypeActionConfigurationPackage.eNS_URI, theSetTypeActionConfigurationPackage); + return theSetTypeActionConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getSetTypeActionConfiguration() { + return setTypeActionConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSetTypeActionConfiguration_ValidTypes() { + return (EAttribute)setTypeActionConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSetTypeActionConfiguration_CreationTypes() { + return (EAttribute)setTypeActionConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public SetTypeActionConfigurationFactory getSetTypeActionConfigurationFactory() { + return (SetTypeActionConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + setTypeActionConfigurationEClass = createEClass(SET_TYPE_ACTION_CONFIGURATION); + createEAttribute(setTypeActionConfigurationEClass, SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES); + createEAttribute(setTypeActionConfigurationEClass, SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + setTypeActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(setTypeActionConfigurationEClass, SetTypeActionConfiguration.class, "SetTypeActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSetTypeActionConfiguration_ValidTypes(), theEcorePackage.getEString(), "validTypes", null, 0, -1, SetTypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSetTypeActionConfiguration_CreationTypes(), theEcorePackage.getEString(), "creationTypes", null, 0, -1, SetTypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //SetTypeActionConfigurationPackageImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java new file mode 100644 index 00000000000..c0ef8931dcf --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java @@ -0,0 +1,188 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage + * @generated + */ +public class SetTypeActionConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static SetTypeActionConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public SetTypeActionConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = SetTypeActionConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected SetTypeActionConfigurationSwitch modelSwitch = + new SetTypeActionConfigurationSwitch() { + @Override + public Adapter caseSetTypeActionConfiguration(SetTypeActionConfiguration object) { + return createSetTypeActionConfigurationAdapter(); + } + @Override + public Adapter caseConfigurationElement(ConfigurationElement object) { + return createConfigurationElementAdapter(); + } + @Override + public Adapter caseActionConfiguration(ActionConfiguration object) { + return createActionConfigurationAdapter(); + } + @Override + public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return createSemanticActionConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration Set Type Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration + * @generated + */ + public Adapter createSetTypeActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement + * @generated + */ + public Adapter createConfigurationElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration + * @generated + */ + public Adapter createActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration Semantic Action Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration + * @generated + */ + public Adapter createSemanticActionConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //SetTypeActionConfigurationAdapterFactory diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java new file mode 100644 index 00000000000..333a7bbb8d4 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java @@ -0,0 +1,172 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; +import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement; +import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration; + +import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage + * @generated + */ +public class SetTypeActionConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static SetTypeActionConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public SetTypeActionConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = SetTypeActionConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION: { + SetTypeActionConfiguration setTypeActionConfiguration = (SetTypeActionConfiguration)theEObject; + T result = caseSetTypeActionConfiguration(setTypeActionConfiguration); + if (result == null) result = caseSemanticActionConfiguration(setTypeActionConfiguration); + if (result == null) result = caseActionConfiguration(setTypeActionConfiguration); + if (result == null) result = caseConfigurationElement(setTypeActionConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Set Type Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Set Type Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSetTypeActionConfiguration(SetTypeActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Configuration Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConfigurationElement(ConfigurationElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseActionConfiguration(ActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Semantic Action Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticActionConfiguration(SemanticActionConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //SetTypeActionConfigurationSwitch diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfiguration.java new file mode 100644 index 00000000000..67fc57cf78c --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfiguration.java @@ -0,0 +1,60 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration; + +/** + * + * A representation of the model object 'Stereotyped Element Matcher Configuration'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration#getStereotypedQualifiedName Stereotyped Qualified Name}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage#getStereotypedElementMatcherConfiguration() + * @model + * @generated + */ +public interface StereotypedElementMatcherConfiguration extends MatcherConfiguration { + /** + * Returns the value of the 'Stereotyped Qualified Name' attribute. + * + *

    + * If the meaning of the 'Stereotyped Qualified Name' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'Stereotyped Qualified Name' attribute. + * @see #setStereotypedQualifiedName(String) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage#getStereotypedElementMatcherConfiguration_StereotypedQualifiedName() + * @model + * @generated + */ + String getStereotypedQualifiedName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration#getStereotypedQualifiedName Stereotyped Qualified Name}' attribute. + * + * + * @param value the new value of the 'Stereotyped Qualified Name' attribute. + * @see #getStereotypedQualifiedName() + * @generated + */ + void setStereotypedQualifiedName(String value); + +} // StereotypedElementMatcherConfiguration diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationFactory.java new file mode 100644 index 00000000000..b523829fc39 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationFactory.java @@ -0,0 +1,52 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage + * @generated + */ +public interface StereotypedElementMatcherConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + StereotypedElementMatcherConfigurationFactory eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Stereotyped Element Matcher Configuration'. + * + * + * @return a new object of class 'Stereotyped Element Matcher Configuration'. + * @generated + */ + StereotypedElementMatcherConfiguration createStereotypedElementMatcherConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + StereotypedElementMatcherConfigurationPackage getStereotypedElementMatcherConfigurationPackage(); + +} //StereotypedElementMatcherConfigurationFactory diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationPackage.java new file mode 100644 index 00000000000..38aee4e7e5d --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherConfigurationPackage.java @@ -0,0 +1,161 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationFactory + * @model kind="package" + * @generated + */ +public interface StereotypedElementMatcherConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "stereotypedelementmatcherconfiguration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/payrus/extendedtypes/uml/stereotypematcherconfiguration"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "stereotypedelementmatcherconfiguration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + StereotypedElementMatcherConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationImpl Stereotyped Element Matcher Configuration}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationPackageImpl#getStereotypedElementMatcherConfiguration() + * @generated + */ + int STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION = 0; + + /** + * The feature id for the 'Stereotyped Qualified Name' attribute. + * + * + * @generated + * @ordered + */ + int STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME = ExtendedtypesPackage.MATCHER_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Stereotyped Element Matcher Configuration' class. + * + * + * @generated + * @ordered + */ + int STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.MATCHER_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration Stereotyped Element Matcher Configuration}'. + * + * + * @return the meta object for class 'Stereotyped Element Matcher Configuration'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration + * @generated + */ + EClass getStereotypedElementMatcherConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration#getStereotypedQualifiedName Stereotyped Qualified Name}'. + * + * + * @return the meta object for the attribute 'Stereotyped Qualified Name'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration#getStereotypedQualifiedName() + * @see #getStereotypedElementMatcherConfiguration() + * @generated + */ + EAttribute getStereotypedElementMatcherConfiguration_StereotypedQualifiedName(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + StereotypedElementMatcherConfigurationFactory getStereotypedElementMatcherConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each operation of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationImpl Stereotyped Element Matcher Configuration}' class. + * + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationPackageImpl#getStereotypedElementMatcherConfiguration() + * @generated + */ + EClass STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION = eINSTANCE.getStereotypedElementMatcherConfiguration(); + + /** + * The meta object literal for the 'Stereotyped Qualified Name' attribute feature. + * + * + * @generated + */ + EAttribute STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME = eINSTANCE.getStereotypedElementMatcherConfiguration_StereotypedQualifiedName(); + + } + +} //StereotypedElementMatcherConfigurationPackage diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationFactoryImpl.java new file mode 100644 index 00000000000..497991723e4 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationFactoryImpl.java @@ -0,0 +1,104 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationFactory; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class StereotypedElementMatcherConfigurationFactoryImpl extends EFactoryImpl implements StereotypedElementMatcherConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static StereotypedElementMatcherConfigurationFactory init() { + try { + StereotypedElementMatcherConfigurationFactory theStereotypedElementMatcherConfigurationFactory = (StereotypedElementMatcherConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(StereotypedElementMatcherConfigurationPackage.eNS_URI); + if (theStereotypedElementMatcherConfigurationFactory != null) { + return theStereotypedElementMatcherConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new StereotypedElementMatcherConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION: return createStereotypedElementMatcherConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public StereotypedElementMatcherConfiguration createStereotypedElementMatcherConfiguration() { + StereotypedElementMatcherConfigurationImpl stereotypedElementMatcherConfiguration = new StereotypedElementMatcherConfigurationImpl(); + return stereotypedElementMatcherConfiguration; + } + + /** + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationPackage getStereotypedElementMatcherConfigurationPackage() { + return (StereotypedElementMatcherConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static StereotypedElementMatcherConfigurationPackage getPackage() { + return StereotypedElementMatcherConfigurationPackage.eINSTANCE; + } + +} //StereotypedElementMatcherConfigurationFactoryImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationImpl.java new file mode 100644 index 00000000000..d3f36f85c90 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationImpl.java @@ -0,0 +1,170 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.infra.extendedtypes.impl.MatcherConfigurationImpl; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage; + +/** + * + * An implementation of the model object 'Stereotyped Element Matcher Configuration'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl.StereotypedElementMatcherConfigurationImpl#getStereotypedQualifiedName Stereotyped Qualified Name}
    • + *
    + *

    + * + * @generated + */ +public class StereotypedElementMatcherConfigurationImpl extends MatcherConfigurationImpl implements StereotypedElementMatcherConfiguration { + /** + * The default value of the '{@link #getStereotypedQualifiedName() Stereotyped Qualified Name}' attribute. + * + * + * @see #getStereotypedQualifiedName() + * @generated + * @ordered + */ + protected static final String STEREOTYPED_QUALIFIED_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStereotypedQualifiedName() Stereotyped Qualified Name}' attribute. + * + * + * @see #getStereotypedQualifiedName() + * @generated + * @ordered + */ + protected String stereotypedQualifiedName = STEREOTYPED_QUALIFIED_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected StereotypedElementMatcherConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return StereotypedElementMatcherConfigurationPackage.Literals.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getStereotypedQualifiedName() { + return stereotypedQualifiedName; + } + + /** + * + * + * @generated + */ + public void setStereotypedQualifiedName(String newStereotypedQualifiedName) { + String oldStereotypedQualifiedName = stereotypedQualifiedName; + stereotypedQualifiedName = newStereotypedQualifiedName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME, oldStereotypedQualifiedName, stereotypedQualifiedName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME: + return getStereotypedQualifiedName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME: + setStereotypedQualifiedName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME: + setStereotypedQualifiedName(STEREOTYPED_QUALIFIED_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME: + return STEREOTYPED_QUALIFIED_NAME_EDEFAULT == null ? stereotypedQualifiedName != null : !STEREOTYPED_QUALIFIED_NAME_EDEFAULT.equals(stereotypedQualifiedName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (stereotypedQualifiedName: "); + result.append(stereotypedQualifiedName); + result.append(')'); + return result.toString(); + } + +} //StereotypedElementMatcherConfigurationImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationPackageImpl.java new file mode 100644 index 00000000000..6065c221727 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/impl/StereotypedElementMatcherConfigurationPackageImpl.java @@ -0,0 +1,195 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationFactory; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class StereotypedElementMatcherConfigurationPackageImpl extends EPackageImpl implements StereotypedElementMatcherConfigurationPackage { + /** + * + * + * @generated + */ + private EClass stereotypedElementMatcherConfigurationEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

    Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private StereotypedElementMatcherConfigurationPackageImpl() { + super(eNS_URI, StereotypedElementMatcherConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link StereotypedElementMatcherConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static StereotypedElementMatcherConfigurationPackage init() { + if (isInited) return (StereotypedElementMatcherConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(StereotypedElementMatcherConfigurationPackage.eNS_URI); + + // Obtain or create and register package + StereotypedElementMatcherConfigurationPackageImpl theStereotypedElementMatcherConfigurationPackage = (StereotypedElementMatcherConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StereotypedElementMatcherConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StereotypedElementMatcherConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ExtendedtypesPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theStereotypedElementMatcherConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theStereotypedElementMatcherConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theStereotypedElementMatcherConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(StereotypedElementMatcherConfigurationPackage.eNS_URI, theStereotypedElementMatcherConfigurationPackage); + return theStereotypedElementMatcherConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getStereotypedElementMatcherConfiguration() { + return stereotypedElementMatcherConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStereotypedElementMatcherConfiguration_StereotypedQualifiedName() { + return (EAttribute)stereotypedElementMatcherConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationFactory getStereotypedElementMatcherConfigurationFactory() { + return (StereotypedElementMatcherConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + stereotypedElementMatcherConfigurationEClass = createEClass(STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION); + createEAttribute(stereotypedElementMatcherConfigurationEClass, STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION__STEREOTYPED_QUALIFIED_NAME); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + stereotypedElementMatcherConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getMatcherConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(stereotypedElementMatcherConfigurationEClass, StereotypedElementMatcherConfiguration.class, "StereotypedElementMatcherConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStereotypedElementMatcherConfiguration_StereotypedQualifiedName(), theEcorePackage.getEString(), "stereotypedQualifiedName", null, 0, 1, StereotypedElementMatcherConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //StereotypedElementMatcherConfigurationPackageImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationAdapterFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationAdapterFactory.java new file mode 100644 index 00000000000..71aa79b3e0c --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationAdapterFactory.java @@ -0,0 +1,147 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage + * @generated + */ +public class StereotypedElementMatcherConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static StereotypedElementMatcherConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = StereotypedElementMatcherConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected StereotypedElementMatcherConfigurationSwitch modelSwitch = + new StereotypedElementMatcherConfigurationSwitch() { + @Override + public Adapter caseStereotypedElementMatcherConfiguration(StereotypedElementMatcherConfiguration object) { + return createStereotypedElementMatcherConfigurationAdapter(); + } + @Override + public Adapter caseMatcherConfiguration(MatcherConfiguration object) { + return createMatcherConfigurationAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration Stereotyped Element Matcher Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration + * @generated + */ + public Adapter createStereotypedElementMatcherConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration Matcher Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration + * @generated + */ + public Adapter createMatcherConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //StereotypedElementMatcherConfigurationAdapterFactory diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..33637e7d2f1 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceFactoryImpl.java @@ -0,0 +1,49 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util.StereotypedElementMatcherConfigurationResourceImpl + * @generated + */ +public class StereotypedElementMatcherConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new StereotypedElementMatcherConfigurationResourceImpl(uri); + return result; + } + +} //StereotypedElementMatcherConfigurationResourceFactoryImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceImpl.java new file mode 100644 index 00000000000..64cbe7a234d --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationResourceImpl.java @@ -0,0 +1,37 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util.StereotypedElementMatcherConfigurationResourceFactoryImpl + * @generated + */ +public class StereotypedElementMatcherConfigurationResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public StereotypedElementMatcherConfigurationResourceImpl(URI uri) { + super(uri); + } + +} //StereotypedElementMatcherConfigurationResourceImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationSwitch.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationSwitch.java new file mode 100644 index 00000000000..8e078fb62d9 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationSwitch.java @@ -0,0 +1,136 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrus.infra.extendedtypes.MatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage + * @generated + */ +public class StereotypedElementMatcherConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static StereotypedElementMatcherConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = StereotypedElementMatcherConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case StereotypedElementMatcherConfigurationPackage.STEREOTYPED_ELEMENT_MATCHER_CONFIGURATION: { + StereotypedElementMatcherConfiguration stereotypedElementMatcherConfiguration = (StereotypedElementMatcherConfiguration)theEObject; + T result = caseStereotypedElementMatcherConfiguration(stereotypedElementMatcherConfiguration); + if (result == null) result = caseMatcherConfiguration(stereotypedElementMatcherConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Stereotyped Element Matcher Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Stereotyped Element Matcher Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStereotypedElementMatcherConfiguration(StereotypedElementMatcherConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Matcher Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Matcher Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMatcherConfiguration(MatcherConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //StereotypedElementMatcherConfigurationSwitch diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationXMLProcessor.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationXMLProcessor.java new file mode 100644 index 00000000000..8dcead9cde1 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/util/StereotypedElementMatcherConfigurationXMLProcessor.java @@ -0,0 +1,57 @@ +/** + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; +import org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.StereotypedElementMatcherConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class StereotypedElementMatcherConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public StereotypedElementMatcherConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + StereotypedElementMatcherConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the StereotypedElementMatcherConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new StereotypedElementMatcherConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new StereotypedElementMatcherConfigurationResourceFactoryImpl()); + } + return registrations; + } + +} //StereotypedElementMatcherConfigurationXMLProcessor diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java new file mode 100644 index 00000000000..21561c38347 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/Activator.java @@ -0,0 +1,90 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.uml.tools.extendedtypes; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the ApplyStereotypeActionConfiguration model plugin. + * + * + * @generated + */ +public final class Activator extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final Activator INSTANCE = new Activator(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public Activator() { + super(new ResourceLocator [] {}); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationModelCreation.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationModelCreation.java new file mode 100644 index 00000000000..b094da8cec1 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationModelCreation.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation; + + +/** + * {@link IActionConfigurationModelCreation} for {@link ApplyStereotypeActionConfiguration} + */ +public class ApplyStereotypeActionConfigurationModelCreation implements IActionConfigurationModelCreation { + + /** + * {@inheritDoc} + */ + public ApplyStereotypeActionConfiguration createConfigurationModel() { + return ApplyStereotypeActionConfigurationFactory.eINSTANCE.createApplyStereotypeActionConfiguration(); + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionCreationElementValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionCreationElementValidator.java new file mode 100644 index 00000000000..6641258ad0c --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionCreationElementValidator.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Profile; + +/** + * @author RS211865 + */ +public class ApplyStereotypeActionCreationElementValidator implements IActionCreationElementValidator { + + protected ApplyStereotypeActionConfiguration configuration; + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + if(configuration == null) { + return false; + } + if(!(request.getContainer() instanceof Element)) { + return false; + } + Element container = (Element)request.getContainer(); + Package nearestPackage = container.getNearestPackage(); + if(nearestPackage == null) { + return false; + } + List appliedProfiles = nearestPackage.getAllAppliedProfiles(); + if(appliedProfiles==null) { + // no profiles applied, no stereotype can be applied + return false; + } + List appliedProfileNames = new ArrayList(); + for(Profile profile : appliedProfiles) { + appliedProfileNames.add(profile.getQualifiedName()); + } + for(StereotypeToApply stereotypeToApply : configuration.getStereotypesToApply()) { + List requiredProfiles = stereotypeToApply.getRequiredProfiles(); + if(requiredProfiles != null) { + for(String requiredProfile : requiredProfiles) { + if(!appliedProfileNames.contains(requiredProfile)) { + return false; + } + } + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public void init(ApplyStereotypeActionConfiguration configuration) { + this.configuration = configuration; + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java new file mode 100644 index 00000000000..11ad64dcaa0 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java @@ -0,0 +1,261 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.emf.Activator; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Stereotype; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.TypedElement; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * advice for the {@link ApplyStereotypeActionConfiguration} + */ +public class ApplyStereotypeActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice { + + /** configuration for this edit helper advice */ + protected ApplyStereotypeActionConfiguration configuration; + + /** + * {@inheritDoc} + */ + public void init(ApplyStereotypeActionConfiguration configuration) { + this.configuration = configuration; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + return super.approveRequest(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + return super.getBeforeConfigureCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterConfigureCommand(ConfigureRequest request) { + if(configuration==null) { + return null; + } + ICommand resultCommand = null; + // retrieve eobject + EObject elementToConfigure = request.getElementToConfigure(); + if(!(elementToConfigure instanceof Element)) { + return null; + } + + TransactionalEditingDomain editingDomain = request.getEditingDomain(); + if(editingDomain ==null) { + return null; + } + // retrieve edit service to get features from configure command + IElementEditService service = ElementEditServiceUtils.getCommandProvider(elementToConfigure); + if(service == null) { + Activator.log.error("Impossible to get edit service from element: " + elementToConfigure, null); + return null; + } + + // for each stereotype, apply stereotype and apply values + for(StereotypeToApply stereotypeToApply : configuration.getStereotypesToApply()) { + Stereotype stereotype = ((Element)elementToConfigure).getApplicableStereotype(stereotypeToApply.getStereotypeQualifiedName()); + + if(stereotype !=null) { + ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(editingDomain, (Element)elementToConfigure, stereotype, stereotypeToApply.isUpdateName()); + if(resultCommand == null) { + resultCommand = applyStereotypeCommand; + } else { + resultCommand = resultCommand.compose(applyStereotypeCommand); + } + + // apply values + for(FeatureToSet featureToSet : stereotypeToApply.getFeaturesToSet()) { + // retrieve feature value + ICommand command = getSetStereotypeFeatureValueCommand((Element)elementToConfigure, stereotype, featureToSet.getFeatureName(), featureToSet.getValue(), service, request); + if(command != null) { + if(resultCommand == null) { + resultCommand = command; + } else { + resultCommand = resultCommand.compose(command); + } + } + } + } + + } + + if(resultCommand != null) { + return resultCommand.reduce(); + } + return super.getAfterConfigureCommand(request); + } + + /** + * @param elementToConfigure + * the eobject to configure + * @param name + * the name of the feature to set + * @param value + * the new value of the feature + */ + protected ICommand getSetStereotypeFeatureValueCommand(Element elementToConfigure, Stereotype stereotype, String name, FeatureValue featureValue, IElementEditService service, ConfigureRequest configureRequest) { + if(name == null) { + Activator.log.debug("No feature name has been set."); + return null; + } + if(elementToConfigure.eClass() == null) { + Activator.log.error("Impossible to find EClass from EObject: " + elementToConfigure, null); + return null; + } + + if(configureRequest.getEditingDomain()==null) { + return null; + } + + // retrieve structural feature for the element to configure + TypedElement typedElement = (TypedElement)stereotype.getMember(name, true, UMLPackage.eINSTANCE.getTypedElement()); + if(typedElement == null) { + Activator.log.error("Impossible to find feature " + name + " for eobject " + elementToConfigure, null); + return null; + } + Object value = getStereotypeValue(elementToConfigure, stereotype, typedElement.getType(), featureValue); + + return new SetStereotypeValueCommand(configureRequest.getEditingDomain(), elementToConfigure, stereotype, name, value); + + } + + + /** + * @param elementToConfigure + * @param stereotype + * @param feature + * @param featureValue + * @return + */ + protected Object getStereotypeValue(Element elementToConfigure, Stereotype stereotype, Type type, FeatureValue featureValue) { + return StereotypeFeatureValueUtils.getValue(elementToConfigure, stereotype, type, featureValue); + } + + + public static class ApplyStereotypeCommand extends AbstractTransactionalCommand { + + private Stereotype stereotype; + + private Element element; + + private boolean rename; + + /** + * @param domain editing domain to modify the element + * @param element the element on which stereotype is applied. Must not be null + * @param stereotype the stereotype to modify + * @param rename + */ + public ApplyStereotypeCommand(TransactionalEditingDomain domain, Element element, Stereotype stereotype, boolean rename) { + super(domain, "Apply Stereotype "+stereotype.getLabel(), getWorkspaceFiles(element)); + this.element = element; + this.stereotype = stereotype; + this.rename = rename; + } + + /** + * {@inheritDoc} + */ + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { + try { + Object stereotypeApplication = element.applyStereotype(stereotype); + if(rename && element instanceof NamedElement) { + if(((NamedElement)element).getNamespace()!=null) { + String newName = NamedElementUtil.getDefaultNameWithIncrementFromBase(stereotype.getName(), ((NamedElement)element).getNamespace().getMembers()); + ((NamedElement)element).setName(newName); + } + } + return CommandResult.newOKCommandResult(stereotypeApplication); + } catch (Throwable t) { + Activator.log.error(t); + return CommandResult.newErrorCommandResult(t.getMessage()); + } + } + } + + + public static class SetStereotypeValueCommand extends AbstractTransactionalCommand { + + private Element element; + private Stereotype stereotype; + private String featureName; + private Object featureValue; + + /** + * Default Constructor + * @param domain editing domain to modify the element + * @param element the element on which stereotype is applied. Must not be null + * @param stereotype the stereotype to modify + * @param featureName name of the stereotype feature to modify + * @param featureValue the new value for the stereotype feature value + */ + public SetStereotypeValueCommand(TransactionalEditingDomain domain, Element element, Stereotype stereotype, String featureName, Object featureValue) { + super(domain, "Set stereotype value "+featureName, getWorkspaceFiles(element.getStereotypeApplication(stereotype))); + this.element = element; + this.stereotype = stereotype; + this.featureName = featureName; + this.featureValue = featureValue; + } + + /** + * {@inheritDoc} + */ + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { + try { + element.setValue(stereotype, featureName, featureValue); + } catch (Throwable t) { + Activator.log.error(t); + return CommandResult.newErrorCommandResult(t.getMessage()); + } + + return CommandResult.newOKCommandResult(element.getValue(stereotype, featureName)); + } + + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeFeatureValueUtils.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeFeatureValueUtils.java new file mode 100644 index 00000000000..b30011bf2f7 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/StereotypeFeatureValueUtils.java @@ -0,0 +1,126 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.papyrus.infra.extendedtypes.Activator; +import org.eclipse.papyrus.infra.extendedtypes.emf.converter.ConverterNotfoundException; +import org.eclipse.papyrus.infra.extendedtypes.emf.converter.ConverterRegistry; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util.ApplyStereotypeActionConfigurationSwitch; +import org.eclipse.papyrus.uml.tools.utils.PrimitivesTypesUtils; +import org.eclipse.uml2.uml.DataType; +import org.eclipse.uml2.uml.Enumeration; +import org.eclipse.uml2.uml.PrimitiveType; +import org.eclipse.uml2.uml.Stereotype; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.ValueSpecification; + + +/** + * Utility class to get values from a {@link FeatureValue} + */ +public class StereotypeFeatureValueUtils { + + protected StereotypeFeatureValueUtils() { + // no instanciation, helper class + } + + /** + * Returns the value to set for a given feature of a given element + * @param elementToConfigure eobject for which feature is set. This must not be null + * @param feature {@link EStructuralFeature} to set. This must not be null + * @param valueModel configuration of the value, stored in the model + * @return the real value that will be set to the object or null if none could be computed + */ + public static Object getValue(final EObject elementToConfigure, final Stereotype stereotype, final Type type, final FeatureValue featureValue) { + + Object result = new ApplyStereotypeActionConfigurationSwitch() { + /** + * {@inheritDoc} + */ + @Override + public Object caseConstantValue(ConstantValue object) { + ValueSpecification valueSpecification = object.getValueInstance(); + + if(valueSpecification==null) { + return null; + } + + try { + if(type instanceof PrimitiveType) { + final PrimitiveType pType = (PrimitiveType)type; + final String name = pType.getName(); + if(PrimitivesTypesUtils.UML_BOOLEAN.equals(name)) { + return ConverterRegistry.getSingleton().convert(boolean.class, valueSpecification); + } else if(PrimitivesTypesUtils.UML_INTEGER.equals(name)) { + return ConverterRegistry.getSingleton().convert(int.class, valueSpecification); + } else if(PrimitivesTypesUtils.UML_REAL.equals(name)) { + return ConverterRegistry.getSingleton().convert(double.class, valueSpecification); + } else if(PrimitivesTypesUtils.UML_STRING.equals(name)) { + return ConverterRegistry.getSingleton().convert(String.class, valueSpecification); + } else if(PrimitivesTypesUtils.UML_UNLIMITED_NATURAL.equals(name)) { + return ConverterRegistry.getSingleton().convert(int.class, valueSpecification); + } else { //custom PrimitiveType + return ConverterRegistry.getSingleton().convert(String.class, valueSpecification); + } + } else if(type instanceof Enumeration) { + return ConverterRegistry.getSingleton().convert(Enumeration.class, valueSpecification); + } else if(type instanceof DataType) {//FIXME manage the data type + return ConverterRegistry.getSingleton().convert(String.class, valueSpecification); + } + } catch (ConverterNotfoundException e) { + Activator.log.error("Impossible to convert "+valueSpecification+ " to fit feature type :"+type, e); + } + return super.caseConstantValue(object); + } + + /** + * {@inheritDoc} + */ + @Override + public Object caseQueryExecutionValue(QueryExecutionValue object) { + throw new UnsupportedOperationException("Query execution values resolution has not been implemented yet"); + }; + + /** + * {@inheritDoc} + */ + @Override + public Object caseDynamicValue(DynamicValue object) { + throw new UnsupportedOperationException("Dynamic values resolution has not been implemented yet"); + }; + + /** + * {@inheritDoc} + */ + @Override + public Object caseListValue(ListValue object) { + // resolve one by one all features in the values list of this listvalue + List results = new ArrayList(); + for(FeatureValue value : object.getValues()) { + Object singleResult = getValue(elementToConfigure, stereotype, type, value); + results.add(singleResult); + } + return results; + }; + + }.doSwitch(featureValue); + return result; + } + + +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationModelCreation.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationModelCreation.java new file mode 100644 index 00000000000..cb5dd5dbb57 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationModelCreation.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantConfigurationModelCreation; + + +/** + * @author RS211865 + */ +public class InvariantStereotypeConfigurationModelCreation implements IInvariantConfigurationModelCreation { + + /** + * {@inheritDoc} + */ + public InvariantStereotypeConfiguration createConfigurationModel() { + return InvariantStereotypeConfigurationFactory.eINSTANCE.createInvariantStereotypeConfiguration(); + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeCreationElementValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeCreationElementValidator.java new file mode 100644 index 00000000000..2917800a751 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeCreationElementValidator.java @@ -0,0 +1,67 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantCreationElementValidator; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Profile; + + + +/** + * @author RS211865 + */ +public class InvariantStereotypeCreationElementValidator implements IInvariantCreationElementValidator { + + private String stereotypeQualifiedName; + private String requiredProfile; + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + // check basic element type can be created + + // check container is a UML element + EObject container = request.getContainer(); + if(!(container instanceof Element)) { + return false; + } + + Package nearestPackage = ((Element)container).getNearestPackage(); + if(nearestPackage == null) { + // impossible to check the applied profiles for the container + return false; + } + + Profile appliedProfile = nearestPackage.getAppliedProfile(requiredProfile, true); + return appliedProfile !=null; + } + + /** + * {@inheritDoc} + */ + public void init(InvariantStereotypeConfiguration configuration) { + stereotypeQualifiedName = configuration.getStereotypeQualifiedName(); + requiredProfile = configuration.getRequiredProfile(); + + if(requiredProfile == null) { + // try to find the profile qualified name from the qualified stereotype name + requiredProfile = stereotypeQualifiedName.substring(stereotypeQualifiedName.lastIndexOf(NamedElement.SEPARATOR)); + } + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeEditHelperAdvice.java new file mode 100644 index 00000000000..c687f354190 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeEditHelperAdvice.java @@ -0,0 +1,62 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantEditHelperAdvice; + + +/** + * EditHelperAdvice for Stereotype application invariant + */ +public class InvariantStereotypeEditHelperAdvice extends AbstractEditHelperAdvice implements IInvariantEditHelperAdvice { + + private String stereotypeQualifiedName; + + /** + * + */ + public InvariantStereotypeEditHelperAdvice() { + } + + /** + * {@inheritDoc} + */ + public void init(InvariantStereotypeConfiguration ruleConfiguration) { + setStereotypeQualifiedName(ruleConfiguration.getStereotypeQualifiedName()); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + // check for stereotype application. Possible in the request system ?! + return super.approveRequest(request); + } + + /** + * @return the stereotypeQualifiedName + */ + public String getStereotypeQualifiedName() { + return stereotypeQualifiedName; + } + + /** + * @param stereotypeQualifiedName the stereotypeQualifiedName to set + */ + public void setStereotypeQualifiedName(String stereotypeQualifiedName) { + this.stereotypeQualifiedName = stereotypeQualifiedName; + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java new file mode 100644 index 00000000000..e76bf3e9471 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java @@ -0,0 +1,61 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantElementMatcher; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Stereotype; + + +/** + * @author RS211865 + */ +public class InvariantStereotypeElementMatcher implements IInvariantElementMatcher { + + private String stereotypeQualifiedName; + + /** + * {@inheritDoc} + */ + public boolean matches(EObject eObject) { + + if(!(eObject instanceof Element)) { + return false; + } + + Stereotype appliedStereotype = ((Element)eObject).getAppliedStereotype(getStereotypeQualifiedName()); + return appliedStereotype !=null; + } + + /** + * {@inheritDoc} + */ + public void init(InvariantStereotypeConfiguration ruleConfiguration) { + setStereotypeQualifiedName(ruleConfiguration.getStereotypeQualifiedName()); + } + + /** + * @return the stereotypeQualifiedName + */ + public String getStereotypeQualifiedName() { + return stereotypeQualifiedName; + } + + /** + * @param stereotypeQualifiedName the stereotypeQualifiedName to set + */ + public void setStereotypeQualifiedName(String stereotypeQualifiedName) { + this.stereotypeQualifiedName = stereotypeQualifiedName; + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/providers/ApplyStereotypeActionProvider.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/providers/ApplyStereotypeActionProvider.java deleted file mode 100644 index 9a5a9adf0fa..00000000000 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/providers/ApplyStereotypeActionProvider.java +++ /dev/null @@ -1,252 +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.uml.tools.extendedtypes.providers; - -import java.util.List; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.gmf.runtime.common.core.command.CommandResult; -import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; -import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; -import org.eclipse.gmf.runtime.common.core.service.IOperation; -import org.eclipse.gmf.runtime.emf.type.core.EditHelperContext; -import org.eclipse.gmf.runtime.emf.type.core.IClientContext; -import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand; -import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; -import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.providers.GetAllExtendedElementTypeActionProvidersOperation; -import org.eclipse.papyrus.infra.extendedtypes.providers.GetExtendedElementTypeActionProviderOperation; -import org.eclipse.papyrus.infra.extendedtypes.providers.IExtendedElementTypeActionProvider; -import org.eclipse.papyrus.uml.tools.extendedtypes.Activator; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; -import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.StereotypeToApply; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.Profile; -import org.eclipse.uml2.uml.Stereotype; - -/** - * Provider for Action that applies stereotypes to an element on creation - */ -public class ApplyStereotypeActionProvider extends AbstractProvider implements IExtendedElementTypeActionProvider { - - /** - * {@inheritDoc} - */ - public boolean provides(IOperation operation) { - if(operation instanceof GetAllExtendedElementTypeActionProvidersOperation) { - return true; - } - if(operation instanceof GetExtendedElementTypeActionProviderOperation) { - return (((GetExtendedElementTypeActionProviderOperation)operation).getActionConfiguration() instanceof ApplyStereotypeActionConfiguration); - } - return false; - } - - /** - * {@inheritDoc} - */ - public ICommand getICommand(List elementsToEdit, ActionConfiguration configuration) { - // try to create the command that will apply the stereotypes - if(!(configuration instanceof ApplyStereotypeActionConfiguration)) { - Activator.INSTANCE.log("Trying to configure a stereotype action configuration with a configuration which is not a stereotype one: " + configuration); - return UnexecutableCommand.INSTANCE; - } - - CompositeCommand compositeCommand = new CompositeCommand("Apply Stereotypes"); - ApplyStereotypeActionConfiguration stereotypeActionConfiguration = (ApplyStereotypeActionConfiguration)configuration; - - // for each object in the list of eobjects to edit, create the stereotype apply command - for(Object objectToEdit : elementsToEdit) { - if(objectToEdit instanceof Element) { - //1. retrieve the list of stereotypes - for(StereotypeToApply stereotypeToApply : stereotypeActionConfiguration.getStereotypesToApply()) { - String qualifiedName = stereotypeToApply.getStereotypeQualifiedName(); - - ICommand command = new ApplyStereotypeCommand((Element)objectToEdit, new ApplyStereotypeRequest(TransactionUtil.getEditingDomain(objectToEdit), (Element)objectToEdit, qualifiedName)); - compositeCommand.add(command); - } - } else { - Activator.INSTANCE.log("Impossible to cast the element to edit into an Element, trying to apply a stereotype on it"); - } - } - return compositeCommand; - } - - /** - * {@inheritDoc} - */ - public ICommand getBeforeCreateValidationCommand(List elementsToEdit, ActionConfiguration configuration) { - // here, element to edit should be the parent of the created element on which the stereotype is applied. - ApplyStereotypeActionConfiguration stereotypeActionConfiguration = (ApplyStereotypeActionConfiguration)configuration; - - for(Object objectToEdit : elementsToEdit) { - for(StereotypeToApply stereotypeToApply : stereotypeActionConfiguration.getStereotypesToApply()) { - // compare this list to accessible profiles from container. - if(objectToEdit instanceof Element) { - Element elementToEdit = ((Element)objectToEdit); - org.eclipse.uml2.uml.Package ownerPackage = elementToEdit.getNearestPackage(); - if(ownerPackage == null) { - return UnexecutableCommand.INSTANCE; - } - for(String requiredProfileName : stereotypeToApply.getRequiredProfiles()) { - Profile profile = ownerPackage.getAppliedProfile(requiredProfileName, true); - if(profile == null) { - return UnexecutableCommand.INSTANCE; - } - } - } - } - } - // returns a null command, which means it is possible to apply the stereotype - return null; - } - - /** - * {@inheritDoc} - */ - public void setConfiguration(IConfigurationElement element) { - // something to do here ? - } - - /** - * Command to apply stereotypes and set stereotype application properties values - */ - public class ApplyStereotypeCommand extends EditElementCommand { - - /** - * Create a new {@link ApplyStereotypeCommand}. - * - * @param elementToEdit - * element to edit - * @param request - * the request used to modify the model - */ - protected ApplyStereotypeCommand(Element elementToEdit, IEditCommandRequest request) { - super("Apply Stereotype Command", elementToEdit, request); - } - - /** - * {@inheritDoc} - */ - @Override - protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { - // retrieve the stereotype - Stereotype stereotypeToApply = getElementToEdit().getApplicableStereotype(getRequest().getStereotypeQualifiedName()); - if(stereotypeToApply == null) { - return CommandResult.newErrorCommandResult("Impossible to find the stereotype " + getRequest().getStereotypeQualifiedName() + " for the element " + getElementToEdit()); - } - EObject result = getElementToEdit().applyStereotype(stereotypeToApply); - if(result != null) { - return CommandResult.newOKCommandResult(); - } - return CommandResult.newErrorCommandResult("Impossible to apply the stereotype " + stereotypeToApply + " for the element " + getElementToEdit()); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean canExecute() { - // check the stereotype is present and can be applied - Stereotype stereotypeToApply = getElementToEdit().getApplicableStereotype(getRequest().getStereotypeQualifiedName()); - if(stereotypeToApply == null) { - return false; - } - return super.canExecute(); - } - - /** - * {@inheritDoc} - */ - @Override - protected Element getElementToEdit() { - return (Element)super.getElementToEdit(); - } - - /** - * {@inheritDoc} - */ - @Override - protected ApplyStereotypeRequest getRequest() { - return (ApplyStereotypeRequest)super.getRequest(); - } - } - - /** - * Request to apply stereotype on an element - */ - public class ApplyStereotypeRequest extends AbstractEditCommandRequest { - - /** element to edit */ - private final Element elementToEdit; - - /** stererotype qualified name */ - private final String stereotypeQualifiedName; - - /** - * Constructor. - * - * @param editingDomain - * editing domain in which the command will be executed - * @param elementToEdit - * element on which the stereotype should be applied - * @param stereotypeQualifiedName - * qualified name of the stereotype to apply - */ - protected ApplyStereotypeRequest(TransactionalEditingDomain editingDomain, Element elementToEdit, String stereotypeQualifiedName) { - super(editingDomain); - this.elementToEdit = elementToEdit; - this.stereotypeQualifiedName = stereotypeQualifiedName; - } - - /** - * {@inheritDoc} - */ - public Object getEditHelperContext() { - IClientContext context = getClientContext(); - - if(context == null) { - return getElementToEdit(); - } else { - return new EditHelperContext(getElementToEdit(), context); - } - } - - /** - * Returns the element to edit - * - * @return the element to edit - */ - public Element getElementToEdit() { - return elementToEdit; - } - - /** - * Returns the qualified name of the stereotype to apply - * - * @return the qualified name of the stereotype to apply - */ - public String getStereotypeQualifiedName() { - return stereotypeQualifiedName; - } - } - -} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java new file mode 100644 index 00000000000..23e19395eb6 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation; + + +/** + * {@link IActionConfigurationModelCreation} for {@link ApplyStereotypeActionConfiguration} + */ +public class SetTypeActionConfigurationModelCreation implements IActionConfigurationModelCreation { + + /** + * {@inheritDoc} + */ + public SetTypeActionConfiguration createConfigurationModel() { + return SetTypeActionConfigurationFactory.eINSTANCE.createSetTypeActionConfiguration(); + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java new file mode 100644 index 00000000000..93787e751a3 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java @@ -0,0 +1,38 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration; + +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator; + +/** + * {@link IActionCreationElementValidator} for {@link SetTypeActionConfiguration} + */ +public class SetTypeActionCreationElementValidator implements IActionCreationElementValidator { + + protected SetTypeActionConfiguration configuration; + + /** + * {@inheritDoc} + */ + public boolean canCreate(CreateElementRequest request) { + return true; + } + + /** + * {@inheritDoc} + */ + public void init(SetTypeActionConfiguration configuration) { + this.configuration = configuration; + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java new file mode 100644 index 00000000000..61ddbecfcbd --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java @@ -0,0 +1,121 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration; + +import java.util.Arrays; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; +import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice; +import org.eclipse.papyrus.infra.extendedtypes.emf.Activator; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration; +import org.eclipse.swt.widgets.Display; +import org.eclipse.uml2.uml.Element; + +/** + * advice for the {@link ApplyStereotypeActionConfiguration} + */ +public class SetTypeActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice { + + /** configuration for this edit helper advice */ + protected SetTypeActionConfiguration configuration; + + /** + * {@inheritDoc} + */ + public void init(SetTypeActionConfiguration configuration) { + this.configuration = configuration; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean approveRequest(IEditCommandRequest request) { + return super.approveRequest(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + return super.getBeforeConfigureCommand(request); + } + + /** + * {@inheritDoc} + */ + @Override + protected ICommand getAfterConfigureCommand(ConfigureRequest request) { + if(configuration==null) { + return null; + } + ICommand resultCommand = null; + // retrieve eobject + final EObject elementToConfigure = request.getElementToConfigure(); + if(!(elementToConfigure instanceof Element)) { + return null; + } + + final TransactionalEditingDomain editingDomain = request.getEditingDomain(); + if(editingDomain ==null) { + return null; + } + // retrieve edit service to get features from configure command + IElementEditService service = ElementEditServiceUtils.getCommandProvider(elementToConfigure); + if(service == null) { + Activator.log.error("Impossible to get edit service from element: " + elementToConfigure, null); + return null; + } + + resultCommand = new AbstractTransactionalCommand(editingDomain, "Editing type", Arrays.asList((WorkspaceSynchronizer.getFile(elementToConfigure.eResource())))) { + + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { + UMLModelElement umlModelElement = new UMLModelElement(elementToConfigure, editingDomain); + ReferenceValueFactory factory = umlModelElement.getValueFactory("type"); + Object elemObject = factory.edit(Display.getDefault().getFocusControl(), elementToConfigure); + return CommandResult.newOKCommandResult(elemObject); + } + }; + + return resultCommand; + } + + /** + * @return + */ + protected EObject getDefaultTypeContainer(ConfigureRequest request) { + if(request.getElementToConfigure() instanceof Element) { + return ((Element)request.getElementToConfigure()).getNearestPackage(); + } + return request.getElementToConfigure().eContainer(); + } + + +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcher.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcher.java new file mode 100644 index 00000000000..4190c1094b6 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcher.java @@ -0,0 +1,60 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.extendedtypes.IConfigurableElementMatcher; +import org.eclipse.uml2.uml.Element; + + +/** + * Matcher for UML elements that should be stereotypes + */ +public class StereotypedElementMatcher implements IConfigurableElementMatcher { + + private String stereotypedQualifiedName; + + /** + * @param stereotypedQualifiedName + */ + public StereotypedElementMatcher(StereotypedElementMatcherConfiguration configuration) { + this.setStereotypedQualifiedName(configuration.getStereotypedQualifiedName()); + } + + /** + * {@inheritDoc} + */ + public boolean matches(EObject eObject) { + if(!(eObject instanceof Element)) { + return false; + } + + return ((Element)eObject).getAppliedStereotype(getStereotypedQualifiedName()) != null; + + } + + /** + * @return the stereotypedQualifiedName + */ + public String getStereotypedQualifiedName() { + return stereotypedQualifiedName; + } + + /** + * @param stereotypedQualifiedName the stereotypedQualifiedName to set + */ + public void setStereotypedQualifiedName(String stereotypedQualifiedName) { + this.stereotypedQualifiedName = stereotypedQualifiedName; + } + +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherFactory.java new file mode 100644 index 00000000000..7dfb5ea679a --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherFactory.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.IConfigurableElementMatcherFactory; + + +/** + * Factory to create matcher based on stereotypes applied on the element + */ +public class StereotypedElementMatcherFactory implements IConfigurableElementMatcherFactory { + + /** + * {@inheritDoc} + */ + public StereotypedElementMatcher createElementMatcher(StereotypedElementMatcherConfiguration configuration) { + return new StereotypedElementMatcher(configuration); + } +} diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherModelCreation.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherModelCreation.java new file mode 100644 index 00000000000..6545177af3c --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/stereotypedelementmatcherconfiguration/StereotypedElementMatcherModelCreation.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * 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: + * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.IElementMatcherConfigurationModelCreation; + + +/** + * Factory in charge of the creation of a new element matcher + */ +public class StereotypedElementMatcherModelCreation implements IElementMatcherConfigurationModelCreation{ + + /** + * {@inheritDoc} + */ + public StereotypedElementMatcherConfiguration createConfigurationModel() { + return StereotypedElementMatcherConfigurationFactory.eINSTANCE.createStereotypedElementMatcherConfiguration(); + } +} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/.project b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/.project index f32f0dff98c..4887ac9519b 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/.project +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/.project @@ -1,28 +1,28 @@ - - - org.eclipse.papyrus.infra.extendedtypes.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - + + + org.eclipse.papyrus.infra.extendedtypes.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/META-INF/MANIFEST.MF index 88e87f832db..e56fafcb15a 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/META-INF/MANIFEST.MF @@ -1,15 +1,27 @@ Manifest-Version: 1.0 -Require-Bundle: org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0", - org.junit;bundle-version="4.10.0" -Export-Package: org.eclipse.papyrus.infra.extendedtypes +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.utils;bundle-version="1.0.0", + org.eclipse.papyrus.uml.tools;bundle-version="1.0.0", + org.eclipse.papyrus.infra.newchild;bundle-version="1.0.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0", + org.eclipse.papyrus.infra.core;bundle-version="1.0.0", + org.eclipse.emf.transaction;bundle-version="1.4.0", + org.eclipse.gmf.runtime.emf.core;bundle-version="1.7.0", + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0", + org.eclipse.gmf.runtime.diagram.ui +Export-Package: org.eclipse.papyrus.infra.extendedtypes.tests Bundle-Vendor: %providerName -Fragment-Host: org.eclipse.papyrus.infra.extendedtypes;bundle-version= - "0.10.0" +Bundle-ActivationPolicy: lazy Bundle-Version: 1.0.0.qualifier -Bundle-Name: %fragmentName -Bundle-Localization: fragment +Bundle-Name: %pluginName +Bundle-Localization: plugin Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.papyrus.extendedtypes.tests;singleton - :=true +Bundle-Activator: org.eclipse.papyrus.infra.extendedtypes.tests.Activa + tor +Bundle-SymbolicName: org.eclipse.papyrus.infra.extendedtypes.tests;sin + gleton:=true Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/build.properties b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/build.properties index 28d3b56ba7d..89abf6ef7cc 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/build.properties +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/build.properties @@ -1,9 +1,9 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - fragment.xml,\ - icons/,\ - model/,\ - fragment.properties,\ - about.html +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + model/,\ + plugin.properties,\ + about.html diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.properties b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.properties deleted file mode 100644 index 374016923b4..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.properties +++ /dev/null @@ -1,12 +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: -# CEA LIST - initial API and implementation -############################################################################### -fragmentName=Papyrus enhanced types metamodel plugin tests (Incubation) -providerName=Eclipse Modeling Project diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.xml b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.xml deleted file mode 100644 index 323f3e28aca..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/fragment.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/M.gif b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/M.gif new file mode 100644 index 00000000000..f9a5b239d6c Binary files /dev/null and b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/M.gif differ diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/O.gif b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/O.gif new file mode 100644 index 00000000000..e6ce0916227 Binary files /dev/null and b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/O.gif differ diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/Values.gif b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/Values.gif new file mode 100644 index 00000000000..f1f019535ea Binary files /dev/null and b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/icons/Values.gif differ diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx new file mode 100644 index 00000000000..09175a9012a --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.di b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.di new file mode 100644 index 00000000000..d2eb61d4a99 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.di @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.notation b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.notation new file mode 100644 index 00000000000..add35f587e1 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.notation @@ -0,0 +1,120 @@ + + + + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.uml b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.uml new file mode 100644 index 00000000000..4e4f00f3fe5 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.profile.uml @@ -0,0 +1,370 @@ + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/MyPalette.palette b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/MyPalette.palette new file mode 100644 index 00000000000..16715342f71 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/MyPalette.palette @@ -0,0 +1 @@ +Electrical \ No newline at end of file diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes new file mode 100644 index 00000000000..bee034e62cf --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes @@ -0,0 +1,122 @@ + + + + + org.eclipse.papyrus.uml.Component + + + + + + + org.eclipse.papyrus.uml.Package + + + + org.eclipse.papyrus.uml.Class + + + + + + + + + + org.eclipse.papyrus.uml.Class + + + ExtendedTypesTestsProfile + + + + + org.eclipse.papyrus.uml.Class + + + ExtendedTypesTestsProfile + + + + + org.eclipse.papyrus.uml.Class + + + ExtendedTypesTestsProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.eclipse.papyrus.infra.extendedtypes.tests.aspectabstractclass + + + ExtendedTypesTestsProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + org.eclipse.papyrus.infra.extendedtypes.tests.classSimpleStereotypeRename + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi new file mode 100644 index 00000000000..e48d7c47063 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di index 65f88a8052c..6392b22281d 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.di @@ -1,15 +1,15 @@ - + - - + + - - + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation index 6780a566229..3c226f86ef6 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.notation @@ -1,39 +1,105 @@ - - - -
    - - -
    - - -
    - - - - + + + + + +
    + + + + + +
    + + + + + + + + +
    + + + + + + + + +
    + + + + + + + + + + + - - + + - - -
    - - -
    - - -
    - - - - + + + + +
    + + + - + + + + + + +
    + + + + + +
    + + + + + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + - + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml index acc9d86ef26..254c4db1865 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml @@ -1,8 +1,116 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + demo + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt new file mode 100644 index 00000000000..207c40fbd34 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.extendedtypes.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.extendedtypes.tests.launch deleted file mode 100644 index cbfc9a9841f..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.extendedtypes.tests.launch +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.infra.extendedtypes.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.infra.extendedtypes.tests.launch new file mode 100644 index 00000000000..869cd7daab0 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/org.eclipse.papyrus.infra.extendedtypes.tests.launch @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.properties b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.properties new file mode 100644 index 00000000000..374016923b4 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.properties @@ -0,0 +1,12 @@ +############################################################################### +# 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: +# CEA LIST - initial API and implementation +############################################################################### +fragmentName=Papyrus enhanced types metamodel plugin tests (Incubation) +providerName=Eclipse Modeling Project diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.xml b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.xml new file mode 100644 index 00000000000..d818bfb1c3a --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/plugin.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/AllTests.java deleted file mode 100644 index 00b90d48b4b..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/AllTests.java +++ /dev/null @@ -1,27 +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.infra.extendedtypes; - -import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferencesTests; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - - -/** - * All tests for this fragment - */ -@RunWith(Suite.class) -@SuiteClasses({ ExtendedTypesRegistryTests.class, ExtendedEditHelperAdviceTests.class, ExtendedTypesPreferencesTests.class }) -public class AllTests { - -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdviceTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdviceTests.java deleted file mode 100644 index 2e1300cb9f6..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedEditHelperAdviceTests.java +++ /dev/null @@ -1,218 +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.infra.extendedtypes; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedEditHelperAdvice; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSet; -import org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry; -import org.eclipse.uml2.uml.Model; -import org.eclipse.uml2.uml.Package; -import org.eclipse.uml2.uml.UMLFactory; -import org.eclipse.uml2.uml.UMLPackage; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/** - * Test class for extended edit helper advice - */ -public class ExtendedEditHelperAdviceTests implements ITestConstants { - - /** test class1 element type */ - private static IElementType class1ElementType; - - /** test class in package element type */ - private static IElementType classInPackageElementType; - - /** test class in model element type */ - private static IElementType classInModelElementType; - - /** class1 configuration element type */ - private static ExtendedElementTypeConfiguration class1ElementTypeConfiguration; - - /** class in package configuration element type */ - private static ExtendedElementTypeConfiguration classInPackageElementTypeConfiguration; - - /** class in model configuration element type */ - private static ExtendedElementTypeConfiguration classInModelElementTypeConfiguration; - - /** extended edit helper advice for class1 */ - private static ExtendedEditHelperAdvice extendedClass1EditHelperAdvice; - - /** extended edit helper advice for class in package */ - private static ExtendedEditHelperAdvice extendedClassInPackageEditHelperAdvice; - - /** extended edit helper advice for class in model */ - private static ExtendedEditHelperAdvice extendedClassInModelEditHelperAdvice; - - /** package with short name */ - private static org.eclipse.uml2.uml.Package shortNamePackage; - - /** package with long name */ - private static org.eclipse.uml2.uml.Package longNamePackage; - - /** model with short Name */ - private static Package shortNameModel; - - /** model with long name */ - private static Package longNameModel; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - // create the configuration passes as argument - class1ElementType = ExtendedTypesRegistry.getInstance().getType(CLASS1_TEST_TYPE_ID); - assertNotNull("Class1 element type should not be null", class1ElementType); - classInPackageElementType = ExtendedTypesRegistry.getInstance().getType(CLASS_IN_PACKAGE_TEST_TYPE_ID); - assertNotNull("Class in package element type should not be null", classInPackageElementType); - classInModelElementType = ExtendedTypesRegistry.getInstance().getType(CLASS_IN_MODEL_TEST_TYPE_ID); - assertNotNull("Class in model element type should not be null", classInModelElementType); - - ExtendedElementTypeSet set = ExtendedTypesRegistry.getInstance().getExtendedElementTypeSet(TEST1_CONFIGURATION_SET_ID, TEST1_MODEL_PATH, org.eclipse.papyrus.infra.extendedtypes.Activator.PLUGIN_ID); - assertNotNull("extended type set should not be null", set); - for(ExtendedElementTypeConfiguration configuration : set.getElementType()) { - if(CLASS1_TEST_TYPE_CONFIGURATION_ID.equals(configuration.getId())) { - class1ElementTypeConfiguration = configuration; - } else if(CLASS_IN_PACKAGE_TEST_TYPE_CONFIGURATION_ID.equals(configuration.getId())) { - classInPackageElementTypeConfiguration = configuration; - } else if(CLASS_IN_MODEL_TEST_TYPE_CONFIGURATION_ID.equals(configuration.getId())) { - classInModelElementTypeConfiguration = configuration; - } - } - assertNotNull("extended type configuration should not be null", class1ElementTypeConfiguration); - assertNotNull("extended type configuration should not be null", classInPackageElementTypeConfiguration); - assertNotNull("extended type configuration should not be null", classInModelElementTypeConfiguration); - extendedClass1EditHelperAdvice = new ExtendedEditHelperAdvice(); - extendedClassInPackageEditHelperAdvice = new ExtendedEditHelperAdvice(); - extendedClassInModelEditHelperAdvice = new ExtendedEditHelperAdvice(); - - // create Test Model - Model model1 = UMLFactory.eINSTANCE.createModel(); - model1.setName("Model1"); - shortNamePackage = model1.createNestedPackage("P"); - longNamePackage = model1.createNestedPackage("veryLongPackage"); - shortNameModel = model1.createNestedPackage("tinyM", UMLPackage.eINSTANCE.getModel()); - longNameModel = model1.createNestedPackage("veryLongModel", UMLPackage.eINSTANCE.getModel()); - - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - class1ElementType = null; - class1ElementTypeConfiguration = null; - extendedClass1EditHelperAdvice = null; - shortNamePackage = null; - longNamePackage = null; - shortNameModel = null; - longNameModel = null; - } - - /** - * @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.infra.extendedtypes.ExtendedEditHelperAdvice#ExtendedEditHelperAdvice(org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeConfiguration)} - * . - */ - @Test - public final void testExtendedEditHelperAdvice() { - assertNotNull("edit helper advice should not be null", extendedClass1EditHelperAdvice); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)} - * . - */ - @Test - public final void testApproveRequestIEditCommandRequest() { - // get the request: create a class on the test packages - - // simple test: test if it the name of the container is long or not enough - CreateElementRequest inShortPackageCreateRequest = new CreateElementRequest(shortNamePackage, class1ElementType); - boolean resultShort = extendedClass1EditHelperAdvice.approveRequest(inShortPackageCreateRequest); - assertTrue("request should always be approved", resultShort); - - // simple test: test if it the name of the container is long or not enough - CreateElementRequest inLongPackageCreateRequest = new CreateElementRequest(longNamePackage, class1ElementType); - boolean resultLong = extendedClass1EditHelperAdvice.approveRequest(inLongPackageCreateRequest); - assertTrue("request should always be approved", resultLong); - - // advanced tests: 2 queries at the same time (test true&false; false&false, false&true, true&true) - // false & false - CreateElementRequest requestShortPackageModel = new CreateElementRequest(shortNamePackage, classInModelElementType); - boolean shortPackageModel = extendedClassInModelEditHelperAdvice.approveRequest(requestShortPackageModel); - assertTrue("request should always be approved", shortPackageModel); - - // true & false - CreateElementRequest requestLongPackageModel = new CreateElementRequest(longNamePackage, classInModelElementType); - boolean longPackageModel = extendedClassInModelEditHelperAdvice.approveRequest(requestLongPackageModel); - assertTrue("request should always be approved", longPackageModel); - - // false & true - CreateElementRequest requestShortPackagePackage = new CreateElementRequest(shortNamePackage, classInPackageElementType); - boolean shortPackagePackage = extendedClassInPackageEditHelperAdvice.approveRequest(requestShortPackagePackage); - assertTrue("request should always be approved", shortPackagePackage); - - // true & true - CreateElementRequest requestlongPackagePackage = new CreateElementRequest(longNamePackage, classInPackageElementType); - boolean longPackagePackage = extendedClassInPackageEditHelperAdvice.approveRequest(requestlongPackagePackage); - assertTrue("request should always be approved", longPackagePackage); - } - - /** - * Test method for - * {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedEditHelperAdvice#getBeforeCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest)} - * . - */ - @Test - public final void testGetBeforeCreateCommandCreateElementRequest() { - // not test here for now... - } - - /** - * Test method for - * {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedEditHelperAdvice#getAfterCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest)} - * . - */ - @Test - public final void testGetAfterCreateCommandCreateElementRequest() { - // test in {oep}.diagram.extendedtypes.uml.tests fragment - } - -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistryTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistryTests.java deleted file mode 100644 index 1bc78e0d106..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypesRegistryTests.java +++ /dev/null @@ -1,128 +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.infra.extendedtypes; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.List; - -import junit.framework.Assert; - -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/** - * Tests for {@link ExtendedTypesRegistry} - */ -public class ExtendedTypesRegistryTests implements ITestConstants { - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDownAfterClass() 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.infra.extendedtypes.ExtendedTypesRegistry#getInstance()}. - */ - @Test - public final void testGetInstance() { - Assert.assertNotNull("The singleton instance should not be null", ExtendedTypesRegistry.getInstance()); - } - - /** - * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry#loadExtendedTypeSets()}. - */ - @Test - public final void testLoadExtendedTypeSets() { - List result = ExtendedTypesRegistry.getInstance().loadExtendedTypeSets(); - - - assertNotNull("The list of extended type sets should not be null after loading", result); - assertTrue("The list of extended type sets should not be empty after loading", result.size() > 0); - - boolean found = false; - for(ExtendedElementTypeSet set : result) { - if(ExtendedTypeSetName_Test1.equals(set.getId())) { - found = true; - } - } - assertTrue("The list should contain Extended Type Set from Test1: " + ExtendedTypeSetName_Test1, found); - } - - /** - * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry#createResourceSet()}. - */ - @Test - public final void testCreateResourceSet() { - ResourceSet set = ExtendedTypesRegistry.getInstance().createResourceSet(); - assertNotNull("Resource set should not be null", set); - } - - /** - * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry#getExtendedElementTypeSet(java.lang.String, java.lang.String)}. - */ - @Test - public final void testGetExtendedElementTypeSet() { - ExtendedElementTypeSet set = ExtendedTypesRegistry.getInstance().getExtendedElementTypeSet(TEST1_CONFIGURATION_SET_ID, TEST1_MODEL_PATH, Activator.PLUGIN_ID); - assertNotNull("Element type model file set should be found", set); - - ExtendedElementTypeSet set2 = ExtendedTypesRegistry.getInstance().getExtendedElementTypeSet("null", NO_FILE, Activator.PLUGIN_ID); - assertNull("Element type model file set should not be found", set2); - } - - /** - * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.ExtendedTypesRegistry#getType(java.lang.String)}. - */ - @Test - public final void testGetType() { - IElementType classType = ExtendedTypesRegistry.getInstance().getType(UMLElementTypes.CLASS.getId()); - assertNotNull("element Type for class should be found", classType); - - IElementType extendedClassType = ExtendedTypesRegistry.getInstance().getType(CLASS1_TEST_TYPE_ID); - assertNotNull("element Type for class should be found", extendedClassType); - - IElementType noType = ExtendedTypesRegistry.getInstance().getType(NO_TYPE); - assertNull("element Type for class should not be found", noType); - } -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ITestConstants.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ITestConstants.java deleted file mode 100644 index 5a12b52ceb7..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/ITestConstants.java +++ /dev/null @@ -1,53 +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.infra.extendedtypes; - - -/** - * Constants for test classes - */ -public interface ITestConstants { - - /** element type id for test1::Class1 */ - public static final String CLASS1_TEST_TYPE_ID = "org.eclipse.papyrus.infra.extendedtypes.tests.Class1"; - - /** element type id for test1::ClassInPackage */ - public static final String CLASS_IN_PACKAGE_TEST_TYPE_ID = "org.eclipse.papyrus.infra.extendedtypes.tests.ClassInPackageOnly"; - - /** element type id for test1::ClassInModel */ - public static final String CLASS_IN_MODEL_TEST_TYPE_ID = "org.eclipse.papyrus.infra.extendedtypes.tests.ClassInModelOnly"; - - - /** name of the extended type set in Test1 */ - public final static String ExtendedTypeSetName_Test1 = "org.eclipse.papyrus.infra.extendedtypes.tests.test1"; - - /** path to a non existing file */ - public static final String NO_FILE = "no_file"; - - /** path to a right model file */ - public static final String TEST1_MODEL_PATH = "/model/Test1.extendedtypes"; - - /** identifier of the extende type set configuration */ - public static final String TEST1_CONFIGURATION_SET_ID = "org.eclipse.papyrus.infra.extendedtypes.tests.test1"; - - /** no type identifier */ - public static final String NO_TYPE = "no_type"; - - /** configuration name for test1::Class1 */ - public static final String CLASS1_TEST_TYPE_CONFIGURATION_ID = "org.eclipse.papyrus.infra.extendedtypes.tests.Class1"; - - /** configuration name for test1::Class1 */ - public static final String CLASS_IN_PACKAGE_TEST_TYPE_CONFIGURATION_ID = CLASS_IN_PACKAGE_TEST_TYPE_ID; - - /** configuration name for test1::Class1 */ - public static final String CLASS_IN_MODEL_TEST_TYPE_CONFIGURATION_ID = CLASS_IN_MODEL_TEST_TYPE_ID; -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferencesTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferencesTests.java deleted file mode 100644 index e8f25397ccf..00000000000 --- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/preferences/ExtendedTypesPreferencesTests.java +++ /dev/null @@ -1,104 +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.infra.extendedtypes.preferences; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences; -import org.eclipse.ui.IMemento; -import org.eclipse.ui.XMLMemento; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/** - * Test class for {@link ExtendedTypesPreferences} - */ -public class ExtendedTypesPreferencesTests extends ExtendedTypesPreferences { - - /** id of the extended type set for tests */ - private final static String EXTENDED_TYPES_TEST_ID = "testExtendedTypes"; - - /** - * @throws java.lang.Exception - * exception thrown in case of issues - */ - @BeforeClass - public static void setUpBeforeClass() throws Exception { - } - - /** - * @throws java.lang.Exception - * exception thrown in case of issues - */ - @AfterClass - public static void tearDownAfterClass() throws Exception { - } - - /** - * @throws java.lang.Exception - * exception thrown in case of issues - */ - @Before - public void setUp() throws Exception { - } - - /** - * @throws java.lang.Exception - * exception thrown in case of issues - */ - @After - public void tearDown() throws Exception { - } - - /** - * Test for local definitions of Palette in preferences - */ - @Test - public final void testLocalRedefinitions() { - // 1. saves the root memento - XMLMemento rootMemento = getLocalRedefinitions(); - IMemento[] extendedTypesRedefinitions = rootMemento.getChildren(EXTENDED_TYPES_REDEFINITION); - - int initialLength = extendedTypesRedefinitions.length; - - // 2. test add - // be sure not already existing - String path = getExtendedTypesRedefinition(EXTENDED_TYPES_TEST_ID); - assertNull("There should be no test extendedTypes yet", path); - - registerLocalRedefinition(EXTENDED_TYPES_TEST_ID, "testAdd.xml"); - - int newLength = initialLength + 1; - XMLMemento newMemento = getLocalRedefinitions(); - IMemento[] newPaletteRedefinitions = newMemento.getChildren(EXTENDED_TYPES_REDEFINITION); - assertTrue("There should be " + newLength + " elements, currently " + newPaletteRedefinitions.length, newLength == newPaletteRedefinitions.length); - String newPath = getExtendedTypesRedefinition(EXTENDED_TYPES_TEST_ID); - assertEquals("There should be a new path for the extendedTypes id", "testAdd.xml", newPath); - - // 3. test remove - unregisterLocalRedefinition(EXTENDED_TYPES_TEST_ID); - newMemento = getLocalRedefinitions(); - newPaletteRedefinitions = newMemento.getChildren(EXTENDED_TYPES_REDEFINITION); - assertTrue("There should be " + newLength + " elements", newPaletteRedefinitions.length == initialLength); - newPath = getExtendedTypesRedefinition(EXTENDED_TYPES_TEST_ID); - assertNull("There should be no path for the extendedTypes id", newPath); - - } -} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/Activator.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/Activator.java new file mode 100644 index 00000000000..6c7df711a20 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/Activator.java @@ -0,0 +1,50 @@ +package org.eclipse.papyrus.infra.extendedtypes.tests; + +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.extendedtypes.tests"; //$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; + } + +} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AllTests.java new file mode 100644 index 00000000000..d29666206a8 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AllTests.java @@ -0,0 +1,26 @@ +/***************************************************************************** + * 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.infra.extendedtypes.tests; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + + +/** + * All tests for this fragment + */ +@RunWith(Suite.class) +@SuiteClasses({ ExtendedTypesRegistryTests.class, }) +public class AllTests { + +} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedEditHelperAdviceTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedEditHelperAdviceTests.java new file mode 100644 index 00000000000..382c670411e --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedEditHelperAdviceTests.java @@ -0,0 +1,200 @@ +/***************************************************************************** + * 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.infra.extendedtypes.tests; + + + +/** + * Test class for extended edit helper advice + */ +public class ExtendedEditHelperAdviceTests implements ITestConstants { + +// /** test class1 element type */ +// private static IElementType class1ElementType; +// +// /** test class in package element type */ +// private static IElementType classInPackageElementType; +// +// /** test class in model element type */ +// private static IElementType classInModelElementType; +// +// /** class1 configuration element type */ +// private static ExtendedElementTypeConfiguration class1ElementTypeConfiguration; +// +// /** class in package configuration element type */ +// private static ExtendedElementTypeConfiguration classInPackageElementTypeConfiguration; +// +// /** class in model configuration element type */ +// private static ExtendedElementTypeConfiguration classInModelElementTypeConfiguration; +// +// /** extended edit helper advice for class1 */ +// private static ExtendedEditHelperAdvice extendedClass1EditHelperAdvice; +// +// /** extended edit helper advice for class in package */ +// private static ExtendedEditHelperAdvice extendedClassInPackageEditHelperAdvice; +// +// /** extended edit helper advice for class in model */ +// private static ExtendedEditHelperAdvice extendedClassInModelEditHelperAdvice; +// +// /** package with short name */ +// private static org.eclipse.uml2.uml.Package shortNamePackage; +// +// /** package with long name */ +// private static org.eclipse.uml2.uml.Package longNamePackage; +// +// /** model with short Name */ +// private static Package shortNameModel; +// +// /** model with long name */ +// private static Package longNameModel; +// +// /** +// * @throws java.lang.Exception +// */ +// @BeforeClass +// public static void setUpBeforeClass() throws Exception { +// // create the configuration passes as argument +// class1ElementType = ExtendedTypesRegistry.getInstance().getType(CLASS1_TEST_TYPE_ID); +// assertNotNull("Class1 element type should not be null", class1ElementType); +// classInPackageElementType = ExtendedTypesRegistry.getInstance().getType(CLASS_IN_PACKAGE_TEST_TYPE_ID); +// assertNotNull("Class in package element type should not be null", classInPackageElementType); +// classInModelElementType = ExtendedTypesRegistry.getInstance().getType(CLASS_IN_MODEL_TEST_TYPE_ID); +// assertNotNull("Class in model element type should not be null", classInModelElementType); +// +// ExtendedElementTypeSet set = ExtendedTypesRegistry.getInstance().getExtendedElementTypeSet(TEST1_CONFIGURATION_SET_ID, TEST1_MODEL_PATH, org.eclipse.papyrus.infra.extendedtypes.tests.Activator.PLUGIN_ID); +// assertNotNull("extended type set should not be null", set); +// for(ExtendedElementTypeConfiguration configuration : set.getElementType()) { +// if(CLASS1_TEST_TYPE_CONFIGURATION_ID.equals(configuration.getId())) { +// class1ElementTypeConfiguration = configuration; +// } else if(CLASS_IN_PACKAGE_TEST_TYPE_CONFIGURATION_ID.equals(configuration.getId())) { +// classInPackageElementTypeConfiguration = configuration; +// } else if(CLASS_IN_MODEL_TEST_TYPE_CONFIGURATION_ID.equals(configuration.getId())) { +// classInModelElementTypeConfiguration = configuration; +// } +// } +// assertNotNull("extended type configuration should not be null", class1ElementTypeConfiguration); +// assertNotNull("extended type configuration should not be null", classInPackageElementTypeConfiguration); +// assertNotNull("extended type configuration should not be null", classInModelElementTypeConfiguration); +// extendedClass1EditHelperAdvice = new ExtendedEditHelperAdvice(); +// extendedClassInPackageEditHelperAdvice = new ExtendedEditHelperAdvice(); +// extendedClassInModelEditHelperAdvice = new ExtendedEditHelperAdvice(); +// +// // create Test Model +// Model model1 = UMLFactory.eINSTANCE.createModel(); +// model1.setName("Model1"); +// shortNamePackage = model1.createNestedPackage("P"); +// longNamePackage = model1.createNestedPackage("veryLongPackage"); +// shortNameModel = model1.createNestedPackage("tinyM", UMLPackage.eINSTANCE.getModel()); +// longNameModel = model1.createNestedPackage("veryLongModel", UMLPackage.eINSTANCE.getModel()); +// +// } +// +// /** +// * @throws java.lang.Exception +// */ +// @AfterClass +// public static void tearDownAfterClass() throws Exception { +// class1ElementType = null; +// class1ElementTypeConfiguration = null; +// extendedClass1EditHelperAdvice = null; +// shortNamePackage = null; +// longNamePackage = null; +// shortNameModel = null; +// longNameModel = null; +// } +// +// /** +// * @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.infra.extendedtypes.tests.ExtendedEditHelperAdvice#ExtendedEditHelperAdvice(org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedElementTypeConfiguration)} +// * . +// */ +// @Test +// public final void testExtendedEditHelperAdvice() { +// assertNotNull("edit helper advice should not be null", extendedClass1EditHelperAdvice); +// } +// +// /** +// * Test method for +// * {@link org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)} +// * . +// */ +// @Test +// public final void testApproveRequestIEditCommandRequest() { +// // get the request: create a class on the test packages +// +// // simple test: test if it the name of the container is long or not enough +// CreateElementRequest inShortPackageCreateRequest = new CreateElementRequest(shortNamePackage, class1ElementType); +// boolean resultShort = extendedClass1EditHelperAdvice.approveRequest(inShortPackageCreateRequest); +// assertTrue("request should always be approved", resultShort); +// +// // simple test: test if it the name of the container is long or not enough +// CreateElementRequest inLongPackageCreateRequest = new CreateElementRequest(longNamePackage, class1ElementType); +// boolean resultLong = extendedClass1EditHelperAdvice.approveRequest(inLongPackageCreateRequest); +// assertTrue("request should always be approved", resultLong); +// +// // advanced tests: 2 queries at the same time (test true&false; false&false, false&true, true&true) +// // false & false +// CreateElementRequest requestShortPackageModel = new CreateElementRequest(shortNamePackage, classInModelElementType); +// boolean shortPackageModel = extendedClassInModelEditHelperAdvice.approveRequest(requestShortPackageModel); +// assertTrue("request should always be approved", shortPackageModel); +// +// // true & false +// CreateElementRequest requestLongPackageModel = new CreateElementRequest(longNamePackage, classInModelElementType); +// boolean longPackageModel = extendedClassInModelEditHelperAdvice.approveRequest(requestLongPackageModel); +// assertTrue("request should always be approved", longPackageModel); +// +// // false & true +// CreateElementRequest requestShortPackagePackage = new CreateElementRequest(shortNamePackage, classInPackageElementType); +// boolean shortPackagePackage = extendedClassInPackageEditHelperAdvice.approveRequest(requestShortPackagePackage); +// assertTrue("request should always be approved", shortPackagePackage); +// +// // true & true +// CreateElementRequest requestlongPackagePackage = new CreateElementRequest(longNamePackage, classInPackageElementType); +// boolean longPackagePackage = extendedClassInPackageEditHelperAdvice.approveRequest(requestlongPackagePackage); +// assertTrue("request should always be approved", longPackagePackage); +// } +// +// /** +// * Test method for +// * {@link org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedEditHelperAdvice#getBeforeCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest)} +// * . +// */ +// @Test +// public final void testGetBeforeCreateCommandCreateElementRequest() { +// // not test here for now... +// } +// +// /** +// * Test method for +// * {@link org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedEditHelperAdvice#getAfterCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest)} +// * . +// */ +// @Test +// public final void testGetAfterCreateCommandCreateElementRequest() { +// // test in {oep}.diagram.extendedtypes.uml.tests fragment +// } + +} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedTypesRegistryTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedTypesRegistryTests.java new file mode 100644 index 00000000000..8e9d00df06c --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ExtendedTypesRegistryTests.java @@ -0,0 +1,225 @@ +/***************************************************************************** + * 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.infra.extendedtypes.tests; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.IOException; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.core.resource.ModelUtils; +import org.eclipse.papyrus.infra.core.resource.NotFoundException; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedElementTypeSetRegistry; +import org.eclipse.papyrus.infra.extendedtypes.ExtendedTypeRegistryService; +import org.eclipse.papyrus.junit.utils.EditorUtils; +import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils; +import org.eclipse.papyrus.junit.utils.ProjectUtils; +import org.eclipse.papyrus.uml.tools.model.UmlModel; +import org.eclipse.papyrus.uml.tools.model.UmlUtils; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PartInitException; +import org.eclipse.uml2.uml.Activity; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Model; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Tests for {@link ExtendedTypesRegistry} + */ +public class ExtendedTypesRegistryTests implements ITestConstants { + + private static IProject createProject; + + private static IFile copyPapyrusModel; + + private static IMultiDiagramEditor openPapyrusEditor; + + private static ModelSet modelset; + + private static UmlModel umlIModel; + + private static Model rootModel; + + private static Activity testActivity; + + private static TransactionalEditingDomain transactionalEditingDomain; + + private static Class testClass; + + private static Activity testActivityWithNode; + + /** + * Init test class + */ + @BeforeClass + public static void initCreateElementTest() { + + // create Project + try { + createProject = ProjectUtils.createProject("ExtendedTypes"); + } catch (CoreException e) { + fail(e.getMessage()); + } + + // import test model + try { + copyPapyrusModel = PapyrusProjectUtils.copyPapyrusModel(createProject, Platform.getBundle("org.eclipse.papyrus.infra.extendedtypes.tests"), "/model/", "model"); + } catch (CoreException e) { + fail(e.getMessage()); + } catch (IOException e) { + fail(e.getMessage()); + } + + // open project + Display.getDefault().syncExec(new Runnable() { + + public void run() { + try { + openPapyrusEditor = EditorUtils.openPapyrusEditor(copyPapyrusModel); + } catch (PartInitException e) { + fail(e.getMessage()); + } + } + }); + + transactionalEditingDomain = (TransactionalEditingDomain)openPapyrusEditor.getAdapter(TransactionalEditingDomain.class); + assertTrue("Impossible to init editing domain", transactionalEditingDomain instanceof TransactionalEditingDomain); + + // retrieve UML model from this editor + try { + modelset = ModelUtils.getModelSetChecked(openPapyrusEditor.getServicesRegistry()); + umlIModel = UmlUtils.getUmlModel(modelset); + rootModel = (Model)umlIModel.lookupRoot(); + + Assert.assertNotNull("root model should not be null", rootModel); + + } catch (ServiceException e) { + fail(e.getMessage()); + } catch (NotFoundException e) { + fail(e.getMessage()); + } catch (ClassCastException e) { + fail(e.getMessage()); + } + try { + initExistingElements(); + } catch (Exception e) { + fail(e.getMessage()); + } + + } + + /** + * Init fields corresponding to element in the test model + */ + private static void initExistingElements() throws Exception { + + + } + + /** + * @throws java.lang.Exception + */ + @AfterClass + public static void tearDownAfterClass() 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 ExtendedElementTypeSetRegistry#getInstance()} + */ + @Test + @Ignore + public final void testGetInstance() { + ExtendedTypeRegistryService service = null; + try { + service = openPapyrusEditor.getServicesRegistry().getService(ExtendedTypeRegistryService.class); + } catch (ServiceException e) { + fail(e.getMessage()); + } + Assert.assertNotNull("Extended type service should not be null", service); + + // retrieve registry from this service + Assert.assertNotNull("Extended type registry singleton should not be null", service.getExtendedElementTypeSetRegistry()); + } + + + /** + * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedTypesRegistry#createResourceSet()}. + */ + @Test + @Ignore + public final void testGetTypeRegisteredInplugin() { + // check standard class + IElementType classType = ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Class"); + Assert.assertNotNull("Element type should be registered", classType); + + IElementType restrictedClassType = ElementTypeRegistry.getInstance().getType(CLASS_ONLY_IN_MODEL_ID); + Assert.assertNotNull("Element type should be registered", restrictedClassType); + } + +// /** +// * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedTypesRegistry#getExtendedElementTypeSet(java.lang.String, java.lang.String)}. +// */ +// @Test +// public final void testGetExtendedElementTypeSet() { +// ExtendedElementTypeSet set = ExtendedTypesRegistry.getInstance().getExtendedElementTypeSet(TEST1_CONFIGURATION_SET_ID, TEST1_MODEL_PATH, Activator.PLUGIN_ID); +// assertNotNull("Element type model file set should be found", set); +// +// ExtendedElementTypeSet set2 = ExtendedTypesRegistry.getInstance().getExtendedElementTypeSet("null", NO_FILE, Activator.PLUGIN_ID); +// assertNull("Element type model file set should not be found", set2); +// } +// +// /** +// * Test method for {@link org.eclipse.papyrus.infra.extendedtypes.tests.ExtendedTypesRegistry#getType(java.lang.String)}. +// */ +// @Test +// public final void testGetType() { +// IElementType classType = ExtendedTypesRegistry.getInstance().getType(UMLElementTypes.CLASS.getId()); +// assertNotNull("element Type for class should be found", classType); +// +// IElementType extendedClassType = ExtendedTypesRegistry.getInstance().getType(CLASS1_TEST_TYPE_ID); +// assertNotNull("element Type for class should be found", extendedClassType); +// +// IElementType noType = ExtendedTypesRegistry.getInstance().getType(NO_TYPE); +// assertNull("element Type for class should not be found", noType); +// } +} diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ITestConstants.java b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ITestConstants.java new file mode 100644 index 00000000000..fbdc4c829ab --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/ITestConstants.java @@ -0,0 +1,25 @@ +/***************************************************************************** + * 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.infra.extendedtypes.tests; + + +/** + * Constants for test classes + */ +public interface ITestConstants { + + public final static String CLASS_ONLY_IN_MODEL_ID = "org.eclipse.papyrus.infra.extendedtypes.tests.classonlyinmodel"; //$NON-NLS-1$ + /** name of the extended type set in Test1 */ + public final static String ExtendedTypeSetName_Test1 = "org.eclipse.papyrus.infra.extendedtypes.tests.tests.test1"; + + +} -- cgit v1.2.3 From ff14cb02e3c00e092cb76de5916ec1272bd0e579 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Mon, 17 Feb 2014 14:46:39 +0100 Subject: 417396: [CSS] The CSS Engine shall support label visibility & mask https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Fix regressions: the Slots compartment is now visible by default in SysML BDD--- .../plugin.xml | 8 ++++++++ .../blockdefinition/tests/utils/TestPrepareUtils.java | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml index f24aa0791a9..1e8cbebb084 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml @@ -1618,6 +1618,14 @@ humanReadableType="TargetRole" type="linklabel_uml_association_target_role"> + + + + diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java index eeb2ddbdaa8..09cccf1cd39 100644 --- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java +++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java @@ -7,7 +7,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * + * * CEA LIST - Initial API and implementation * *****************************************************************************/ @@ -43,6 +43,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; import org.eclipse.gmf.runtime.notation.Node; import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper; import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory; import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; @@ -61,6 +62,9 @@ public class TestPrepareUtils { SetCommand changeVisibilityCommand = new SetCommand(getTransactionalEditingDomain(), view, NotationPackage.eINSTANCE.getView_Visible(), !view.isVisible()); //getCommandStack().execute(new EMFtoGEFCommandWrapper(changeVisibilityCommand)); getTransactionalEditingDomain().getCommandStack().execute(changeVisibilityCommand); + + //Workaround for CSS refresh issue (Bug 416737: [CSS] Setters of the CSS runtime notation API don't take into consideration CSS values) + DiagramHelper.refresh(EditorUtils.getDiagramEditPart(), true); } public static EObject createElement(IElementType elementType, View containerView) throws Exception { @@ -123,7 +127,7 @@ public class TestPrepareUtils { EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() }; @SuppressWarnings("unchecked") - Collection views = (Collection)EMFCoreUtil.getReferencers(newObject, erefs); + Collection views = EMFCoreUtil.getReferencers(newObject, erefs); return (View)views.toArray()[0]; } @@ -143,7 +147,7 @@ public class TestPrepareUtils { EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() }; @SuppressWarnings("unchecked") - Collection views = (Collection)EMFCoreUtil.getReferencers(newView, erefs); + Collection views = EMFCoreUtil.getReferencers(newView, erefs); return (View)views.toArray()[0]; @@ -190,7 +194,7 @@ public class TestPrepareUtils { EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() }; @SuppressWarnings("unchecked") - Collection views = (Collection)EMFCoreUtil.getReferencers(eObject, erefs); + Collection views = EMFCoreUtil.getReferencers(eObject, erefs); return (View)views.toArray()[0]; } -- cgit v1.2.3