summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-06-13 09:44:13 (EDT)
committerLaurent Wouters2014-06-13 09:44:13 (EDT)
commitc04928427ba782343f4d710832307655ce1a6c4c (patch)
tree68ea6dfb69ae40b8beba6e7d6327451bdea927bc
parent5b2299c27544a65170d0600e3b55e61f00780cfa (diff)
downloadorg.eclipse.papyrus-c04928427ba782343f4d710832307655ce1a6c4c.zip
org.eclipse.papyrus-c04928427ba782343f4d710832307655ce1a6c4c.tar.gz
org.eclipse.papyrus-c04928427ba782343f4d710832307655ce1a6c4c.tar.bz2
Fixed the RobotML viewpoint configuration to use static identifierrefs/changes/75/28475/1
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rwxr-xr-xextraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration73
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java6
2 files changed, 50 insertions, 29 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration
index 0d82eda..2a92dd7 100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration
@@ -1,33 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" defaultStakeholder="#//@stakeholders.0" metamodel="http://www.eclipse.org/uml2/5.0.0/UML#/">
- <stakeholders name="RobotML Modeler"/>
- <viewpoints xsi:type="configuration:PapyrusViewpoint" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Architecture Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="CompositeStructure" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/css/style.css">
- <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <childRules/>
- <paletteRules permit="false" element="composite.group.*"/>
+<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_0kyH4PL_EeONXPQ2mbw9vA" defaultStakeholder="_0kyu8PL_EeONXPQ2mbw9vA">
+ <stakeholders xmi:id="_0kyu8PL_EeONXPQ2mbw9vA" name="RobotML Modeler"/>
+ <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_0kyu8fL_EeONXPQ2mbw9vA" name="Default Papyrus Viewpoint">
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_0kzWAPL_EeONXPQ2mbw9vA" name="RobotML Architecture Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.gif" implementationID="CompositeStructure" categories="_0kz9GPL_EeONXPQ2mbw9vA" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/css/style.css">
+ <profiles href="http://Papyrus/RobotML/1#/"/>
+ <modelRules xmi:id="_0kzWAfL_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_0kzWAvL_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_0kzWA_L_EeONXPQ2mbw9vA"/>
+ <paletteRules xmi:id="_0kzWBPL_EeONXPQ2mbw9vA" permit="false" element="composite.group.*"/>
</modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Component Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="CompositeStructure" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/css/style.css">
- <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <childRules/>
- <paletteRules permit="false" element="composite.group.*"/>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_0kzWBfL_EeONXPQ2mbw9vA" name="RobotML Component Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.gif" implementationID="CompositeStructure" categories="_0kz9GPL_EeONXPQ2mbw9vA" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/css/style.css">
+ <profiles href="http://Papyrus/RobotML/1#/"/>
+ <modelRules xmi:id="_0kzWBvL_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_0kzWB_L_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_0kzWCPL_EeONXPQ2mbw9vA"/>
+ <paletteRules xmi:id="_0kzWCfL_EeONXPQ2mbw9vA" permit="false" element="composite.group.*"/>
</modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Datatype Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypeD.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypedef.palette.xml">
- <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <childRules/>
- <paletteRules permit="false" element="clazz.group.*"/>
- <paletteRules permit="false" element="org.eclipse.papyrus.robotml.diagram.clazz"/>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_0kzWCvL_EeONXPQ2mbw9vA" name="RobotML Datatype Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypeD.gif" implementationID="PapyrusUMLClassDiagram" categories="_0kz9GPL_EeONXPQ2mbw9vA" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypedef.palette.xml">
+ <profiles href="http://Papyrus/RobotML/1#/"/>
+ <modelRules xmi:id="_0kzWC_L_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_0kzWDPL_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_0kzWDfL_EeONXPQ2mbw9vA"/>
+ <paletteRules xmi:id="_0kz9EPL_EeONXPQ2mbw9vA" permit="false" element="clazz.group.*"/>
+ <paletteRules xmi:id="_0kz9EfL_EeONXPQ2mbw9vA" permit="false" element="org.eclipse.papyrus.robotml.diagram.clazz"/>
</modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Interface Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfaceI.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfacedef.palette.xml">
- <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <childRules/>
- <paletteRules permit="false" element="clazz.group.*"/>
- <paletteRules permit="false" element="org.eclipse.papyrus.robotml.diagram.clazz"/>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_0kz9EvL_EeONXPQ2mbw9vA" name="RobotML Interface Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfaceI.gif" implementationID="PapyrusUMLClassDiagram" categories="_0kz9GPL_EeONXPQ2mbw9vA" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfacedef.palette.xml">
+ <profiles href="http://Papyrus/RobotML/1#/"/>
+ <modelRules xmi:id="_0kz9E_L_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_0kz9FPL_EeONXPQ2mbw9vA">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_0kz9FfL_EeONXPQ2mbw9vA"/>
+ <paletteRules xmi:id="_0kz9FvL_EeONXPQ2mbw9vA" permit="false" element="clazz.group.*"/>
+ <paletteRules xmi:id="_0kz9F_L_EeONXPQ2mbw9vA" permit="false" element="org.eclipse.papyrus.robotml.diagram.clazz"/>
</modelKinds>
</viewpoints>
- <categories name="robotML"/>
+ <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+ <categories xmi:id="_0kz9GPL_EeONXPQ2mbw9vA" name="robotML"/>
</configuration:PapyrusConfiguration>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
index 19f68ec..0280472 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
@@ -990,11 +990,11 @@ public class PolicyChecker {
* The stereotypes applied on <code>element</code>
* @return The check result
*/
- private int allows(ChildRule rule, EObject origin, EObject element, Collection<EClass> stereotypes) {
+ private int allows(ChildRule rule, EClass origin, EClass element, Collection<EClass> stereotypes) {
EClass ce = rule.getElement();
EClass co = rule.getOrigin();
- if ((ce == null || ce.isSuperTypeOf(element.eClass()))
- && (co == null || co.isSuperTypeOf(origin.eClass()))) {
+ if ((ce == null || ce.isSuperTypeOf(element))
+ && (co == null || co.isSuperTypeOf(origin))) {
// matching type => check the application of the required stereotypes
for (EClass stereotype : rule.getStereotypes())
if (!stereotypes.contains(stereotype))