Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2011-05-23 16:07:36 +0000
committerptessier2011-05-23 16:07:36 +0000
commit67e49ea008133fc00fa6bbc934143b4f924a1052 (patch)
tree4fbcae55c0931d0bbb9aaac4351a68e52079bec2 /extraplugins/deprecated-plugins
parentf273af8ac29a1040193803db0e7eab4b7e3a8003 (diff)
downloadorg.eclipse.papyrus-67e49ea008133fc00fa6bbc934143b4f924a1052.tar.gz
org.eclipse.papyrus-67e49ea008133fc00fa6bbc934143b4f924a1052.tar.xz
org.eclipse.papyrus-67e49ea008133fc00fa6bbc934143b4f924a1052.zip
315780: [SysML] Papyrus shall support SysML Requirement diagram
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315780
Diffstat (limited to 'extraplugins/deprecated-plugins')
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.classpath7
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.project28
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF19
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/about.html28
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/build.properties12
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gifbin0 -> 102 bytes
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gifbin0 -> 112 bytes
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties17
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/palette/requirement.palette.xml47
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties52
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml265
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java110
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java25
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java63
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCondition.java39
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java49
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java28
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java116
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.java49
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java65
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java24
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java46
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java22
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ClassPreferencePage.java63
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentPreferencePage.java21
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPreferenceInitializer.java34
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPrintingPreferencePage.java28
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramRulersAndGridPreferencePage.java28
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java56
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java28
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.java25
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.java25
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/EditPolicyProvider.java56
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementEditPartProvider.java90
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementTypes.java84
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementViewProvider.java177
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java30
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramElementTypes.java23
-rw-r--r--extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java31
39 files changed, 1910 insertions, 0 deletions
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.classpath b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.project b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.project
new file mode 100644
index 00000000000..b4fccf80b99
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.requirement</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..357b3656fd8
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.requirement;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.requirement.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.diagram.common;bundle-version="0.8.0",
+ org.eclipse.papyrus.diagram.clazz,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.3.0",
+ org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.8.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.4.0",
+ org.eclipse.papyrus.preferences;bundle-version="0.8.0",
+ org.eclipse.papyrus.sysml;bundle-version="0.8.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/about.html b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/build.properties b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/build.properties
new file mode 100644
index 00000000000..f5107d98314
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/build.properties
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ plugin.xml,\
+ icons/,\
+ palette/,\
+ messages.properties,\
+ plugin.properties,\
+ about.html,\
+ META-INF/
+src.includes = palette/,\
+ icons/
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gif b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gif
new file mode 100644
index 00000000000..7b8efd2d6d1
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gif
Binary files differ
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif
new file mode 100644
index 00000000000..f87c907444b
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif
Binary files differ
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties
new file mode 100644
index 00000000000..be8f4c1d348
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties
@@ -0,0 +1,17 @@
+#################################################################################
+# 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:
+# Hubert Dubois (CEA LIST) hubert.dubois@cea.fr - initial API and implementation
+##################################################################################
+# TODO: manually put keys and values
+
+Diagram_Name = NewDiagram
+Problem_Opening = Problem Opening
+Cannot_Open_Input_Element = Cannot Open Input Element
+No_EditPart_Can_Be_Created = No EditPart Can Be created
+No_View_Can_Be_Created = No View Can Be Created \ No newline at end of file
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/palette/requirement.palette.xml b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/palette/requirement.palette.xml
new file mode 100644
index 00000000000..2e071e52b29
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/palette/requirement.palette.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><paletteDefinition><content><drawer iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" id="requirement.drawer.nodes" name="Nodes"><aspectTool description="Create a new Package" id="requirement.tool.package" name="Package" refToolId="clazz.tool.package"></aspectTool><aspectTool description="Create a new Requirement" id="requirement.tool.class" name="Requirement" refToolId="clazz.tool.class" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif"><postAction id="org.eclipse.papyrus.applystereotypeactionprovider"><stereotypesToApply><stereotype stereotypeName="SysML::Requirements::Requirement"/></stereotypesToApply></postAction></aspectTool></drawer><drawer iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" id="requirement.drawer.edges" name="Edges">
+ <aspectTool description="Create a Copy Link"
+ id="requirement.tool.copy" name="Copy"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SysML::Requirements::Copy" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a Derive Link"
+ id="requirement.tool.derive" name="Derive"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype
+ stereotypeName="SysML::Requirements::DeriveReqt" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a Decompose Link"
+ id="requirement.tool.decompose" name="Decompose"
+ refToolId="clazz.tool.containmentlink"/>
+ <aspectTool description="Create a Satisfy Link"
+ id="requirement.tool.satisfy" name="Satisfy"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype
+ stereotypeName="SysML::Requirements::Satisfy" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a Verify Link"
+ id="requirement.tool.verify" name="Verify"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype
+ stereotypeName="SysML::Requirements::Verify" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool></drawer></content></paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties
new file mode 100644
index 00000000000..e7ecb24c5b2
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties
@@ -0,0 +1,52 @@
+#################################################################################
+# 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:
+# Hubert Dubois (CEA LIST) hubert.dubois@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Papyrus SysML Requirement Diagram for SysML (Incubation)
+providerName=Eclipse Modeling Project
+
+preferences.general=SysML Diagram
+preferences.appearance=Appearance
+preferences.connections=Connections
+preferences.printing=Printing
+preferences.rulersAndGrid=Rulers & Grid
+preferences.pathmaps=Path Maps
+
+editorName=SysML Diagram Editing
+context.description=SysML Diagram Editing
+context.name=In SysML Diagram Editor
+newWizardName=SysML Diagram
+newWizardDesc=Creates SysML diagram.
+
+initDiagramActionLabel=Initialize sysml_requirement diagram file
+loadResourceActionLabel=Load Resource...
+
+
+navigatorContentName=*.sysml_requirementdiagram diagram contents
+domainNavigatorContentName=*.sysml model contents
+update.diagram.name=Update SysML diagram
+update.diagram.description=Perform SysML diagram update
+
+
+# Property Sheet
+tab.appearance=Appearance
+tab.diagram=Rulers & Grid
+tab.domain=Core
+
+# Preferences
+preference.page.title.org.eclipse.uml2.uml.diagram.general=SysML Diagram
+preference.page.title.org.eclipse.uml2.uml.diagram.appearance=Appearance
+preference.page.title.org.eclipse.uml2.uml.diagram.connections=Connections
+preference.page.title.org.eclipse.uml2.uml.diagram.printing=Printing
+preference.page.title.org.eclipse.uml2.uml.diagram.rulersAndGrid=Rulers And Grid
+preference.page.title.org.eclipse.uml2.uml.diagram.pathmaps=Pathmaps
+
+
+# Providers
+
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
new file mode 100644
index 00000000000..9f39075702a
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.core.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand"
+ creationCondition="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCondition"
+ icon="icons/obj16/Diagram_Requirement.gif"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ label="SysML Requirement Diagram"
+ language="sysml"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramEditorFactory"
+ icon="icons/obj16/Diagram_Requirement.gif"/>
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ name="SysML Requirement Diagram"
+ description="SysML Requirement Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+</extension>
+
+<extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.requirement.CreateRequirementDiagramWithNavigationHandler"
+ commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand">
+ <activeWhen>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
+ </with>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Diagram creation command registration in menu and toolbar -->
+<extension point="org.eclipse.ui.menus">
+
+ <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
+ <menu id="org.eclipse.papyrus.diagram.ui.menu.diagrams" label="Diagrams">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
+ style="push" tooltip="Create a new Requirement Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+ </command>
+ </menu>
+ </menuContribution>
+
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
+ style="push" tooltip="Create a new Requirement Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+ </command>
+ </toolbar>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.papyrus.modelexplorer.popupmenu.creatediagram">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ icon="icons/obj16/Diagram_Requirement.gif"
+ label="Create a new Requirement Diagram"
+ style="push"
+ tooltip="Create a new Requirement Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.diagram.common.paletteDefinition">
+ <paletteDefinition ID="SysML_Req"
+ class="org.eclipse.papyrus.diagram.common.service.PluginPaletteProvider"
+ name="RequirementDiagram" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palette/requirement.palette.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.requirement"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="RequirementDiagram"/>
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from ClassDiagram UMLViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedElementViewProvider">
+ <Priority name="Low"/>
+ <!--
+ "2008, 3010" = Class
+ "2007, 3009" = Package
+ "2097" = NamedElement
+ "3032" = ContainmentCircle
+ "3012" = Property CLN
+ "3013" = Operation CLN
+ "3011" = Reception CLN
+ "3014" = Class CLN
+ -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2008, 3010, 2007, 3009, 2097, 3032"/>
+ <!-- CLN -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3012, 3013, 3011, 3014"/>
+ <!--
+ "4006" = Abstraction
+ "4023, 4022" = ContainmentLink, AddedLink
+ -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4006, 4022, 4023"/>
+ </viewProvider>
+
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.requirement.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="Requirement"/>
+ </object>
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from CompositeStructureDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedElementEditPartProvider">
+ <Priority name="Low"/>
+
+ <!--
+ The semantic hints given here are used in case the provider is not already loaded.
+ As soon as the provider is loaded its provides method is used.
+
+ "2008, 5029, 7017, 7018, 7019" = Class / name label / compartment (Prop - Oper - NestClass)
+ "3010, 5014, 7013, 7012, 7011" = Class / name label / compartment (Prop - Oper - NestClass) (CN)
+ "3012, 3013, 3011, 3014" = Class compartment element labels
+
+ "2007, 5026, 7016" = Package / name label / packageable element compartment
+ "3009, 5017, 7010" = Package / name label / packageable element compartment (CN)
+
+ "2097, 5157" = NamedElement / name label
+
+ "3032" = ContainmentCircle
+ -->
+ <object
+ id="Class"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="2008, 5029, 7017, 7018, 7019, 3010, 5014, 7013, 7012, 7011, 3012, 3013, 3011, 3014"/>
+ </object>
+ <object
+ id="Package"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="2007, 5026, 7016, 3009, 5017, 7010"/>
+ </object>
+ <object
+ id="NamedElement"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="2097, 5157"/>
+ </object>
+ <object
+ id="ContainmentCircle"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="3032"/>
+ </object>
+
+ <!--
+ "4006" = Abstraction
+ "6014" = Abstraction name label
+ "6015" = Abstraction applied stereotype label
+ "4023, 4022" = ContainmentLink, AddedLink
+ -->
+ <object
+ id="Abstraction"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="4006, 6014, 6015"/>
+ </object>
+ <object
+ id="ContainmentLink"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="4023, 4022"/>
+ </object>
+
+ <context views="Class, Package, NamedElement, ContainmentCircle"/>
+ <context views="Abstraction, ContainmentLink"/>
+
+ </editpartProvider>
+
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.requirement.provider.EditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <page id="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ name="PapyrusSysMLRequirement Diagram"
+ category="org.eclipse.papyrus.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.RequirementDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Not yet supported individually by diagrams (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=318865)
+ <page
+ category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.DiagramPrintingPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.DiagramPrintingPreferencePage"
+ name="Printing">
+ </page>
+ <page
+ category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferencesDiagramRulesAndGridPreferences"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferencesDiagramRulesAndGridPreferences"
+ name="Rules and Grid">
+ </page>
+ -->
+
+ <!-- Element Preference pages declaration -->
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ClassPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ClassPreferencePage"
+ name="Class">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackagePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackagePreferencePage"
+ name="Package">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.AbstractionPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.AbstractionPreferencePage"
+ name="Abstraction">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ContainmentPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ContainmentPreferencePage"
+ name="Containment">
+ </page>
+
+</extension>
+
+</plugin>
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java
new file mode 100644
index 00000000000..a2b9353a765
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.log.LogHelper;
+import org.eclipse.papyrus.sysml.diagram.requirement.preferences.DiagramPreferenceInitializer;
+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 {
+
+
+ /** Logging helper */
+ public static LogHelper log;
+
+ /**
+ * The PLUGIN_ID of the SysML Requirement Diagram.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.diagram.requirement"; //$NON-NLS-1$
+
+ /**
+ * The preferences reference for the SysML Requirement Diagram.
+ */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor of the SysML Requirement Diagram
+ */
+ 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(plugin);
+
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+ // Preferences initialization
+ DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
+ diagramPreferenceInitializer.initializeDefaultPreferences();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return Shared Preference Store.
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = org.eclipse.papyrus.preferences.Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java
new file mode 100644
index 00000000000..7afab7e23f8
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.papyrus.navigation.CreateDiagramWithNavigationHandler;
+
+
+public class CreateRequirementDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
+
+ public CreateRequirementDiagramWithNavigationHandler() {
+ super(new RequirementDiagramCreateCommand(), new RequirementDiagramCondition());
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java
new file mode 100644
index 00000000000..3d8a84a4633
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Hubert Dubois (CEA LIST) hubert.dubois@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @generated
+ */
+public class Messages extends NLS {
+
+ /**
+ * @generated
+ */
+ public static String Diagram_Name;
+
+ /**
+ * @generated
+ */
+ public static String Problem_Opening;
+
+ /**
+ * @generated
+ */
+ public static String Cannot_Open_Input_Element;
+
+ /**
+ * @generated
+ */
+ public static String No_EditPart_Can_Be_Created;
+
+ /**
+ * @generated
+ */
+ public static String No_View_Can_Be_Created;
+
+ /**
+ * @generated
+ */
+ static {
+ NLS.initializeMessages("messages", Messages.class);
+ }
+
+ // TODO: put accessor fields manually
+
+ /**
+ * @generated
+ */
+ private Messages() {
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCondition.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCondition.java
new file mode 100644
index 00000000000..5eeb5d88d7e
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCondition.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.core.extension.commands.PerspectiveContextDependence;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
+
+/**
+ * RequirementDiagramCondition to set conditions for the diagram creation
+ */
+public class RequirementDiagramCondition extends PerspectiveContextDependence {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean create(EObject selectedElement) {
+ if(super.create(selectedElement)) {
+ if(selectedElement instanceof org.eclipse.uml2.uml.Package) {
+ org.eclipse.uml2.uml.Package pack = (org.eclipse.uml2.uml.Package)selectedElement;
+ if(pack.getAppliedProfile(SysmlResource.BLOCKS_ID, true) != null) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java
new file mode 100644
index 00000000000..c39a04bb4df
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.papyrus.core.adaptor.gmf.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Creation commands for the SysML Requirement Diagram
+ */
+public class RequirementDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
+
+ protected EObject createRootElement() {
+ return UMLFactory.eINSTANCE.createModel();
+
+ }
+
+ @Override
+ protected String getDefaultDiagramName() {
+ return "ReqDiagram";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDiagramNotationID() {
+ return RequirementDiagramEditPart.DIAGRAM_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PreferencesHint getPreferenceHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java
new file mode 100644
index 00000000000..e8a0e83417e
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.papyrus.core.adaptor.gmf.GmfEditorFactory;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+/**
+ * Factory for the SysML Requirement Diagram
+ */
+public class RequirementDiagramEditorFactory extends GmfEditorFactory {
+
+ /**
+ * Constructor.
+ *
+ */
+ public RequirementDiagramEditorFactory() {
+ super(RequirementDiagramForMultiEditor.class, RequirementDiagramEditPart.DIAGRAM_ID);
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
new file mode 100644
index 00000000000..d167fa8374c
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.core.editor.BackboneException;
+import org.eclipse.papyrus.core.services.ServiceException;
+import org.eclipse.papyrus.core.services.ServicesRegistry;
+import org.eclipse.papyrus.sysml.diagram.requirement.part.RequirementDiagramEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * An editor to be used in multitabs editor. This editor extends the original
+ * UML Diagram.
+ *
+ */
+public class RequirementDiagramForMultiEditor extends RequirementDiagramEditor {
+
+ /**
+ * The location of diagram icon in the plug-in
+ */
+ private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Requirement.gif";
+
+ /**
+ * The image descriptor of the diagram icon
+ */
+ private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(RequirementDiagramForMultiEditor.DIAG_IMG_PATH);
+
+ /** The editor splitter. */
+ private Composite splitter;
+
+ /**
+ * Constructor for SashSystem v2. Context and required objects are retrieved
+ * from the ServiceRegistry.
+ *
+ * @param servicesRegistry
+ * @param diagram
+ *
+ * @throws BackboneException
+ * @throws ServiceException
+ *
+ */
+ public RequirementDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ setPartName(getDiagram().getName());
+ setTitleImage(DIAG_IMG_DESC.createImage());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setInput(IEditorInput input) {
+ try {
+ // Provide an URI with fragment in order to reuse the same Resource
+ // and set the diagram to the fragment.
+ URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
+ doSetInput(uriInput, true);
+ } catch (CoreException x) {
+ String title = Messages.Problem_Opening;
+ String msg = Messages.Cannot_Open_Input_Element;
+ Shell shell = getSite().getShell();
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createGraphicalViewer(Composite parent) {
+ splitter = parent;
+ super.createGraphicalViewer(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ splitter.setFocus();
+ super.setFocus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditingDomainID() {
+ return "org.eclipse.papyrus.sysml.diagram.requirement.EditingDomain";
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.java
new file mode 100644
index 00000000000..9962871585c
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.clazz.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomDragDropEditPolicy;
+
+/**
+ * Edit Part for the SysML Requirement Diagram
+ *
+ */
+public class RequirementDiagramEditPart extends DiagramEditPart {
+
+ /**
+ * SysML Requirement Diagram identifier
+ */
+ public final static String DIAGRAM_ID = "RequirementDiagram"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public RequirementDiagramEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+
+ // This edit policy reuses the edit policy from Class Diagram, but in not perfectly
+ // consistent with GMF Runtime as it tends to break the extensible type framework.
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java
new file mode 100644
index 00000000000..175942bee80
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java
@@ -0,0 +1,65 @@
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramElementTypes;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
+import org.eclipse.uml2.uml.Abstraction;
+
+public class CustomDragDropEditPolicy extends ClassDiagramDragDropEditPolicy {
+
+ @Override
+ public int getLinkWithClassVisualID(EObject domainElement) {
+ String semanticHint = "-1";
+
+ if(domainElement instanceof Abstraction) {
+ semanticHint = RequirementDiagramElementTypes.ABSTRACTION.getSemanticHint();
+ }
+
+ return new Integer(semanticHint);
+
+ }
+
+ @Override
+ public int getNodeVisualID(View containerView, EObject domainElement) {
+ String semanticHint = "-1";
+
+ // Fill the semantic hint during the drop when the top level is the Requirement Diagram
+ if(containerView instanceof Diagram) {
+ if(domainElement instanceof org.eclipse.uml2.uml.Package) {
+ semanticHint = RequirementDiagramElementTypes.PACKAGE.getSemanticHint();
+ }
+ if((domainElement instanceof org.eclipse.uml2.uml.Class)) {
+ org.eclipse.uml2.uml.Class domainElementClass = (org.eclipse.uml2.uml.Class)domainElement;
+ if(domainElementClass.getAppliedStereotype(SysmlResource.REQUIREMENT_ID) != null) {
+ semanticHint = RequirementDiagramElementTypes.CLASS.getSemanticHint();
+ }
+ }
+ }
+
+ // Fill the semantic hint during the drop when the top level is the an element in the Requirement Diagram (a Package for instance)
+ else {
+ if(domainElement instanceof org.eclipse.uml2.uml.Package) {
+ semanticHint = RequirementDiagramElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if((domainElement instanceof org.eclipse.uml2.uml.Class)) {
+ org.eclipse.uml2.uml.Class domainElementClass = (org.eclipse.uml2.uml.Class)domainElement;
+ if(domainElementClass.getAppliedStereotype(SysmlResource.REQUIREMENT_ID) != null) {
+ semanticHint = RequirementDiagramElementTypes.CLASS_CN.getSemanticHint();
+ }
+ }
+ }
+
+ // In the case of we want to Drag and drop something else than a package or a Requirement, if this is a NamedElement,
+ // we can fill the semanticHint with the NamedElement dedicated Value
+ if(semanticHint == "-1") {
+ if((domainElement instanceof org.eclipse.uml2.uml.NamedElement)) {
+ semanticHint = RequirementDiagramElementTypes.NAMED_ELEMENT.getSemanticHint();
+ }
+ }
+
+ return new Integer(semanticHint);
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java
new file mode 100644
index 00000000000..5a98ef2244c
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+
+/**
+ * Requirement Diagram view Factory
+ */
+public class RequirementDiagramViewFactory extends DiagramViewFactory {
+
+ @Override
+ protected MeasurementUnit getMeasurementUnit() {
+ return MeasurementUnit.PIXEL_LITERAL;
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java
new file mode 100644
index 00000000000..30a67857349
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.part;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.core.services.ServiceException;
+import org.eclipse.papyrus.core.services.ServicesRegistry;
+import org.eclipse.papyrus.diagram.clazz.part.UMLDiagramEditor;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * SysML Requirement Diagram editor that extend the UML Class Diagram editor
+ *
+ */
+public class RequirementDiagramEditor extends UMLDiagramEditor {
+
+ @Override
+ public String getContributorId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ @Override
+ protected PreferencesHint getPreferencesHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param servicesRegistry
+ * @param diagram
+ * @throws ServiceException
+ */
+ public RequirementDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java
new file mode 100644
index 00000000000..c11ad484b07
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java
@@ -0,0 +1,22 @@
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+
+/**
+ * Preference Page for Class usage in Requirement Diagram
+ *
+ */
+public class AbstractionPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /**
+ * Constructor.
+ *
+ */
+
+ public AbstractionPreferencePage() {
+ super();
+ setPreferenceKey(RequirementDiagramEditPart.DIAGRAM_ID + "_Containment"); //$NON-NLS-1$
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ClassPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ClassPreferencePage.java
new file mode 100644
index 00000000000..9aea55956d4
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ClassPreferencePage.java
@@ -0,0 +1,63 @@
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.diagram.clazz.part.Messages;
+import org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+/**
+ * Preference Page for Class usage in Requirement Diagram
+ *
+ */
+public class ClassPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /**
+ * the list of the compartments for this node
+ */
+ public static final String compartments[] = { Messages.ClassAttributeCompartmentEditPartCN_title, Messages.ClassOperationCompartmentEditPartCN_title, Messages.ClassNestedClassifierCompartmentEditPartCN_title};
+
+ /**
+ * Constructor.
+ *
+ */
+ public ClassPreferencePage() {
+ super();
+ setPreferenceKey(RequirementDiagramEditPart.DIAGRAM_ID + "_Class"); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @param store
+ */
+ public static void initDefaults(IPreferenceStore store) {
+
+ String key = RequirementDiagramEditPart.DIAGRAM_ID + "_Class";
+ // Compartment visibility is set to false by default as
+ // Property, Operation, NestedClassifier compartment are
+ // not useful for most users in Requirement diagram.
+
+ // These compartment can still be shown after creation (creation Preference may also be modified).
+ for(String name : compartments) {
+ String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(key, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(preferenceName, false);
+ }
+
+ // Requirement default size
+ store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 120);
+ store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 80);
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
+ *
+ */
+ @Override
+ protected void initializeCompartmentsList() {
+ for(String name : compartments) {
+ this.compartmentsList.add(name);
+ }
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentPreferencePage.java
new file mode 100644
index 00000000000..5eed82230e3
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentPreferencePage.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+/**
+ * Preference Page for Class usage in Requirement Diagram
+ *
+ */
+public class ContainmentPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /**
+ * Constructor.
+ *
+ */
+
+ public ContainmentPreferencePage() {
+ super();
+ setPreferenceKey(RequirementDiagramEditPart.DIAGRAM_ID + "_ContainmentCircle"); //$NON-NLS-1$
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPreferenceInitializer.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPreferenceInitializer.java
new file mode 100644
index 00000000000..43e822cd5a7
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPreferenceInitializer.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * SysML Requirement Diagram preferences
+ *
+ */
+public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getDefault().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+ ClassPreferencePage.initDefaults(store);
+
+ PackagePreferencePage.initDefaults(store);
+
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPrintingPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPrintingPreferencePage.java
new file mode 100644
index 00000000000..89de1366bdb
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramPrintingPreferencePage.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * SysML Requirement diagram printing preferences (extends Papyrus printing preferences)
+ *
+ */
+public class DiagramPrintingPreferencePage extends PrintingPreferencePage {
+
+ /**
+ * Constructor.
+ *
+ */
+ public DiagramPrintingPreferencePage() {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramRulersAndGridPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramRulersAndGridPreferencePage.java
new file mode 100644
index 00000000000..ef0b564ec81
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DiagramRulersAndGridPreferencePage.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * SysML Requirement Diagram Rulers and Grid preferences definition (extends Papyrus Rulers and Grid preferences)
+ *
+ */
+public class DiagramRulersAndGridPreferencePage extends RulerGridPreferencePage {
+
+ /**
+ * Constructor.
+ *
+ */
+ public DiagramRulersAndGridPreferencePage() {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java
new file mode 100644
index 00000000000..4394451499b
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java
@@ -0,0 +1,56 @@
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.diagram.clazz.part.Messages;
+import org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+
+/**
+ * Preference Page for Class usage in Requirement Diagram
+ *
+ */
+public class PackagePreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /**
+ * the list of the compartments for this node
+ */
+ public static final String compartments[] = { Messages.PackagePackageableElementCompartmentEditPartCN_title };
+
+
+ /**
+ * Constructor.
+ *
+ */
+ public PackagePreferencePage() {
+ super();
+ setPreferenceKey(RequirementDiagramEditPart.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @param store
+ */
+ public static void initDefaults(IPreferenceStore store) {
+
+ String key = RequirementDiagramEditPart.DIAGRAM_ID + "_Package";
+ // set the true value for the compartment visibility
+ for(String name : compartments) {
+ String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(key, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(preferenceName, true);
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
+ *
+ */
+ @Override
+ protected void initializeCompartmentsList() {
+ for(String name : compartments) {
+ this.compartmentsList.add(name);
+ }
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java
new file mode 100644
index 00000000000..830715a2d7d
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.papyrus.preferences.pages.DiagramPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * SysML Requirement Diagram general preferences (extends Papyrus diagram general preferences)
+ *
+ */
+public class RequirementDiagramGeneralPreferencePage extends DiagramPreferencePage {
+
+ /**
+ * Constructor.
+ *
+ */
+ public RequirementDiagramGeneralPreferencePage() {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.java
new file mode 100644
index 00000000000..be95b862d20
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.papyrus.preferences.pages.AbstractPapyrusLinkPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * Preference management for Link elements (referenced by Association)
+ */
+
+public class RequirementDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
+
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.java
new file mode 100644
index 00000000000..e7c42584d34
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * Preference management for Node elements (referenced by Class, Package)
+ *
+ */
+public class RequirementDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
+
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/EditPolicyProvider.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/EditPolicyProvider.java
new file mode 100644
index 00000000000..a448a673948
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/EditPolicyProvider.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gef.EditPart;
+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.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.common.editpolicies.NavigationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomDragDropEditPolicy;
+
+/**
+ * Requirement Diagram edit policy provider
+ */
+public class EditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ public boolean provides(IOperation operation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
+
+ if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+
+ GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+
+ if(!RequirementDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if((gep instanceof PackagePackageableElementCompartmentEditPart) || (gep instanceof PackagePackageableElementCompartmentEditPartCN)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ editPart.installEditPolicy(NavigationEditPolicy.NAVIGATION_POLICY, new NavigationEditPolicy());
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementEditPartProvider.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementEditPartProvider.java
new file mode 100644
index 00000000000..8296bf43d94
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementEditPartProvider.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.clazz.custom.providers.CUMLEditPartProvider;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * SysML Requirement Diagram inherited elements providers from UML Class Diagram providers
+ *
+ */
+public class InheritedElementEditPartProvider extends CUMLEditPartProvider {
+
+ @Override
+ public synchronized boolean provides(IOperation operation) {
+ if(operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation)operation).getView();
+
+ // Ensure current diagram is an InternalBlock Diagram
+ if(!RequirementDiagramEditPart.DIAGRAM_ID.equals(view.getDiagram().getType())) {
+ return false;
+ }
+
+ // Test for supported inherited types for related accepted nodes and edges
+ EObject eobject = view.getElement();
+ if((eobject instanceof NamedElement)) {
+ return true;
+ }
+
+ // Test supported inherited types
+ String hint = view.getType();
+
+ /** Nodes *********** */
+
+ /** Package */
+ if(RequirementDiagramElementTypes.PACKAGE.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.PACKAGE_NAME_LABEL_HINT.equals(hint) || RequirementDiagramElementTypes.PACKAGE_COMPARTMENT_HINT.equals(hint)) {
+ return true;
+ }
+
+ if(RequirementDiagramElementTypes.PACKAGE_CN.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.PACKAGE_CN_NAME_LABEL_HINT.equals(hint) || RequirementDiagramElementTypes.PACKAGE_CN_COMPARTMENT_HINT.equals(hint)) {
+ return true;
+ }
+ /** Class */
+ if(RequirementDiagramElementTypes.CLASS.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.CLASS_NAME_LABEL_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_COMPARTMENT_PROP_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_COMPARTMENT_OPER_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_COMPARTMENT_NEST_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_PROP_CLN.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.CLASS_OPER_CLN.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.CLASS_RECP_CLN.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.CLASS_NEST_CLN.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+ if(RequirementDiagramElementTypes.CLASS_CN.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.CLASS_CN_NAME_LABEL_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_CN_COMPARTMENT_PROP_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_CN_COMPARTMENT_OPER_HINT.equals(hint) || RequirementDiagramElementTypes.CLASS_CN_COMPARTMENT_NEST_HINT.equals(hint)) {
+ return true;
+ }
+
+ /** NamedElement */
+ if(RequirementDiagramElementTypes.NAMED_ELEMENT.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.NAMED_ELEMENT_NAME_LABEL_HINT.equals(hint)) {
+ return true;
+ }
+
+ /** Containment */
+ if(RequirementDiagramElementTypes.CONTAINMENT_CIRCLE.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+ /** Edges *********** */
+
+ /** Abstraction */
+ if(RequirementDiagramElementTypes.ABSTRACTION.getSemanticHint().equals(hint) || RequirementDiagramElementTypes.ABSTRACTION_NAME_LABEL_HINT.equals(hint) || RequirementDiagramElementTypes.ABSTRACTION_STEREOTYPE_LABEL_HINT.equals(hint)) {
+ return true;
+ }
+
+ /** ContainmentLink */
+ if((RequirementDiagramElementTypes.CONTAINMENT_LINK.getSemanticHint().equals(hint)) || (RequirementDiagramElementTypes.CONTAINMENT_ADDED_LINK.getSemanticHint().equals(hint))) {
+ return true;
+ }
+
+ }
+ return false;
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementTypes.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementTypes.java
new file mode 100644
index 00000000000..268e0f81808
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementTypes.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+public class InheritedElementTypes extends AbstractElementTypeEnumerator {
+
+ /** ********************************************************* */
+ /** Requirement Diagram - Class Diagram related elements */
+ /** ********************************************************* */
+
+ /** Class Diagram :: Package ChildNode */
+ public static final IHintedType PACKAGE_CN = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Package_3009"); //$NON-NLS-1$
+
+ public static final String PACKAGE_CN_NAME_LABEL_HINT = "5017"; //$NON-NLS-1$
+
+ public static final String PACKAGE_CN_COMPARTMENT_HINT = "7010"; //$NON-NLS-1$
+
+ /** Class Diagram :: Package TopLevelNode */
+ public static final IHintedType PACKAGE = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Package_2007"); //$NON-NLS-1$
+
+ public static final String PACKAGE_NAME_LABEL_HINT = "5026"; //$NON-NLS-1$
+
+ public static final String PACKAGE_COMPARTMENT_HINT = "7016"; //$NON-NLS-1$
+
+ /** Class Diagram :: NamedElement TopLevelNode */
+ public static final IHintedType NAMED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.NamedElement_2097"); //$NON-NLS-1$
+
+ public static final String NAMED_ELEMENT_NAME_LABEL_HINT = "5157"; //$NON-NLS-1$
+
+ /** Class Diagram :: Class ChildNode */
+ public static final IHintedType CLASS_CN = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Class_3010"); //$NON-NLS-1$
+
+ public static final String CLASS_CN_NAME_LABEL_HINT = "5014"; //$NON-NLS-1$
+
+ public static final String CLASS_CN_COMPARTMENT_PROP_HINT = "7011"; //$NON-NLS-1$
+
+ public static final String CLASS_CN_COMPARTMENT_OPER_HINT = "7012"; //$NON-NLS-1$
+
+ public static final String CLASS_CN_COMPARTMENT_NEST_HINT = "7013"; //$NON-NLS-1$
+
+ /** Class Diagram :: Class TopLevelNode */
+ public static final IHintedType CLASS = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Class_2008"); //$NON-NLS-1$
+
+ public static final String CLASS_NAME_LABEL_HINT = "5029"; //$NON-NLS-1$
+
+ public static final String CLASS_COMPARTMENT_PROP_HINT = "7017"; //$NON-NLS-1$
+
+ public static final String CLASS_COMPARTMENT_OPER_HINT = "7018"; //$NON-NLS-1$
+
+ public static final String CLASS_COMPARTMENT_NEST_HINT = "7019"; //$NON-NLS-1$
+
+ public static final IHintedType CLASS_PROP_CLN = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Property_3012"); //$NON-NLS-1$
+
+ public static final IHintedType CLASS_OPER_CLN = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Operation_3013"); //$NON-NLS-1$
+
+ public static final IHintedType CLASS_RECP_CLN = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Reception_3011"); //$NON-NLS-1$
+
+ public static final IHintedType CLASS_NEST_CLN = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Class_3014"); //$NON-NLS-1$
+
+ /** Class Diagram :: Abstraction */
+ public static final IHintedType ABSTRACTION = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.Abstraction_4006"); //$NON-NLS-1$
+
+ public static final String ABSTRACTION_NAME_LABEL_HINT = "6014"; //$NON-NLS-1$
+
+ public static final String ABSTRACTION_STEREOTYPE_LABEL_HINT = "6015"; //$NON-NLS-1$
+
+ /** Class Diagram :: ContainmentLink */
+ public static final IHintedType CONTAINMENT_LINK = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.ContainmentLink_4023"); //$NON-NLS-1$
+
+ public static final IHintedType CONTAINMENT_ADDED_LINK = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.AddedLink_4022"); //$NON-NLS-1$
+
+ public static final IHintedType CONTAINMENT_CIRCLE = (IHintedType)getElementType("org.eclipse.papyrus.diagram.clazz.ContainmentCircle_3032"); //$NON-NLS-1$
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementViewProvider.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementViewProvider.java
new file mode 100644
index 00000000000..0b1623ae640
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedElementViewProvider.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import static org.eclipse.papyrus.core.Activator.log;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.diagram.clazz.providers.UMLViewProvider;
+import org.eclipse.papyrus.sysml.diagram.requirement.Messages;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * SysML Requirement diagram inherited elements view providers from UML Class diagram view providers
+ *
+ */
+public class InheritedElementViewProvider extends UMLViewProvider {
+
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if(!RequirementDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ protected boolean provides(CreateEdgeViewOperation op) {
+
+ // Must have a container
+ if(op.getContainerView() == null) {
+ return false;
+ }
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if(!RequirementDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
+ if(elementType == RequirementDiagramElementTypes.ABSTRACTION) {
+ return true;
+ }
+
+ if((elementType == RequirementDiagramElementTypes.CONTAINMENT_ADDED_LINK) || (elementType == RequirementDiagramElementTypes.CONTAINMENT_LINK)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected boolean provides(CreateNodeViewOperation op) {
+
+ // Must have a container
+ if(op.getContainerView() == null) {
+ return false;
+ }
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if(!RequirementDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ // This provider is registered for Imported Elements from Class Diagram only
+ IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
+
+ if((elementType == RequirementDiagramElementTypes.PACKAGE) || (elementType == RequirementDiagramElementTypes.PACKAGE_CN)) {
+ return true;
+ }
+
+ if((elementType == RequirementDiagramElementTypes.CLASS) || (elementType == RequirementDiagramElementTypes.CLASS_CN)) {
+ return true;
+ }
+
+ if((elementType == RequirementDiagramElementTypes.NAMED_ELEMENT)) {
+ return true;
+ }
+
+ if(elementType == RequirementDiagramElementTypes.CONTAINMENT_CIRCLE) {
+ return true;
+ }
+
+ // SemanticHint may be null (especially when drop from ModelExplorer)
+ EObject eobject = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
+ if(eobject instanceof NamedElement) {
+ return true;
+ }
+
+ // else : unknown element
+ return false;
+
+ }
+
+
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+
+ if(semanticHint != null) {
+ return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ }
+
+ // SemanticHint may be null when the element is created indirectly by
+ // DND (Drag And Drop) from model explorer
+ EObject eobject = (EObject)semanticAdapter.getAdapter(EObject.class);
+ if(eobject instanceof org.eclipse.uml2.uml.Package) {
+ if(containerView instanceof Diagram) {
+ return super.createNode(semanticAdapter, containerView, RequirementDiagramElementTypes.PACKAGE.getSemanticHint(), index, persisted, preferencesHint);
+ } else {
+ return super.createNode(semanticAdapter, containerView, RequirementDiagramElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
+ }
+
+ } else if(eobject instanceof org.eclipse.uml2.uml.Class) {
+ if(containerView instanceof Diagram) {
+ return super.createNode(semanticAdapter, containerView, RequirementDiagramElementTypes.CLASS.getSemanticHint(), index, persisted, preferencesHint);
+ } else {
+ return super.createNode(semanticAdapter, containerView, RequirementDiagramElementTypes.CLASS_CN.getSemanticHint(), index, persisted, preferencesHint);
+ }
+
+ } else if(eobject instanceof NamedElement) {
+ if(containerView instanceof Diagram) {
+ return super.createNode(semanticAdapter, containerView, RequirementDiagramElementTypes.NAMED_ELEMENT.getSemanticHint(), index, persisted, preferencesHint);
+ }
+ }
+
+ log.error(new Exception(Messages.No_View_Can_Be_Created));
+ return null;
+
+ }
+
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+
+ if(createdEdge == null) {
+ log.error(new Exception(Messages.No_View_Can_Be_Created));
+ }
+
+ return createdEdge;
+ }
+
+ @Override
+ protected void stampShortcut(View containerView, Node target) {
+ if(!RequirementDiagramEditPart.DIAGRAM_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", RequirementDiagramEditPart.DIAGRAM_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java
new file mode 100644
index 00000000000..ec5d3067b04
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+/**
+ * SysML Requirement Diagram Edit Part provider from generic Edit Part provider
+ *
+ */
+public class RequirementDiagramEditPartProvider extends AbstractEditPartProvider {
+
+ @Override
+ protected Class<?> getDiagramEditPartClass(View view) {
+ if(RequirementDiagramEditPart.DIAGRAM_ID.equals(view.getType())) {
+ return RequirementDiagramEditPart.class;
+ }
+ return null;
+ }
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramElementTypes.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramElementTypes.java
new file mode 100644
index 00000000000..a9e8796aef5
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramElementTypes.java
@@ -0,0 +1,23 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+public class RequirementDiagramElementTypes extends InheritedElementTypes {
+
+ /** ********************************************************* */
+ /** Requirement Diagram specific elements ******************* */
+ /** ********************************************************* */
+
+ /** Internal Block Diagram :: Diagram */
+ public static final IHintedType REQUIREMENT_DIAGRAM = (IHintedType)getElementType("RequirementDiagram"); //$NON-NLS-1$
+
+}
diff --git a/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java
new file mode 100644
index 00000000000..31b6b2e951f
--- /dev/null
+++ b/extraplugins/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+import org.eclipse.papyrus.sysml.diagram.requirement.factory.RequirementDiagramViewFactory;
+
+
+/**
+ * SysML Requirement Diagram View provider from generic view provider
+ *
+ */
+public class RequirementDiagramViewProvider extends AbstractViewProvider {
+
+ @Override
+ protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
+ if(RequirementDiagramEditPart.DIAGRAM_ID.equals(diagramKind)) {
+ return RequirementDiagramViewFactory.class;
+ }
+ return null;
+ }
+}

Back to the top