Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2012-07-05 08:19:28 -0400
committerptessier2012-07-05 08:19:28 -0400
commit6137259c1faf1b95adeb54d0955505522f6b8bab (patch)
treefe260805c29b254392c4fb26d05e8a620cc67fbd
parent295bbd62d57b44b4cfb7069d3ce165bc8917c4f4 (diff)
downloadorg.eclipse.papyrus-6137259c1faf1b95adeb54d0955505522f6b8bab.tar.gz
org.eclipse.papyrus-6137259c1faf1b95adeb54d0955505522f6b8bab.tar.xz
org.eclipse.papyrus-6137259c1faf1b95adeb54d0955505522f6b8bab.zip
384332: [OCL Usage] add dedicated property view for constraints added in the profile
https://bugs.eclipse.org/bugs/show_bug.cgi?id=384332
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.classpath7
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.project28
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/META-INF/MANIFEST.MF15
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/about.html28
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/bin/org/eclipse/papyrus/dsml/validation/properties/Activator.classbin0 -> 990 bytes
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/build.properties10
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/customizationConfiguration.xmi4
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.properties12
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.xml3
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/dsmlvalidationproperties.ctx39
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/MultipleValidationRule.xwt25
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/SingleValidationRule.xwt34
-rw-r--r--extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java50
14 files changed, 262 insertions, 0 deletions
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.classpath b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.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/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.project b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.project
new file mode 100644
index 00000000000..62b0b7e9257
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.dsml.validation.properties</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/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.settings/org.eclipse.jdt.core.prefs b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/META-INF/MANIFEST.MF b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..66053e7014d
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.views.properties
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.dsml.validation.properties.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.dsml.validation.properties;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
+Bundle-Vendor: %providerName
+
+
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/about.html b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/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/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/bin/org/eclipse/papyrus/dsml/validation/properties/Activator.class b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/bin/org/eclipse/papyrus/dsml/validation/properties/Activator.class
new file mode 100644
index 00000000000..98c57ece4f7
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/bin/org/eclipse/papyrus/dsml/validation/properties/Activator.class
Binary files differ
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/build.properties b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/build.properties
new file mode 100644
index 00000000000..28376927d3a
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/build.properties
@@ -0,0 +1,10 @@
+#
+#Thu Jul 05 14:08:54 CEST 2012
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+output..=bin/
+source..=src/
+src.includes = about.html,\
+ plugin.properties
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/customizationConfiguration.xmi b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/customizationConfiguration.xmi
new file mode 100644
index 00000000000..cf1513f934d
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/customizationConfiguration.xmi
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ASCII"?>
+<custom:CustomizationConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:custom="http://www.eclipse.org/papyrus/customization" plugin="org.eclipse.papyrus.dsml.validation.properties">
+ <elements xsi:type="custom:PropertyView" file="/org.eclipse.papyrus.dsml.validation/resource/properties/dsmlvalidationproperties.ctx"/>
+</custom:CustomizationConfiguration>
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.properties b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.properties
new file mode 100644
index 00000000000..add4103ae2b
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# CEA LIST - initial API and implementation
+##################################################################################
+pluginName=DSML validation properties view (Incubation)
+providerName=Eclipse Modeling Project \ No newline at end of file
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.xml b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.xml
new file mode 100644
index 00000000000..379295bbab9
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/plugin.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><?eclipse version="3.4"?>
+<plugin>
+<extension point="org.eclipse.papyrus.views.properties.context"><context contextModel="/propertyView/dsmlvalidationproperties/dsmlvalidationproperties.ctx"/></extension></plugin> \ No newline at end of file
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/dsmlvalidationproperties.ctx b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/dsmlvalidationproperties.ctx
new file mode 100644
index 00000000000..ea9c6b73fae
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/dsmlvalidationproperties.ctx
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="PapyrusDSMLValidationRule">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#/"/>
+ <tabs label="Validation Rules Definition" id="papyrusdsmlvalidationrule" priority="100">
+ <sections name="Single ValidationRule" sectionFile="ui/SingleValidationRule.xwt">
+ <widget href="ui/SingleValidationRule.xwt#/"/>
+ </sections>
+ <sections name="Multiple ValidationRule" sectionFile="ui/MultipleValidationRule.xwt">
+ <widget href="ui/MultipleValidationRule.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="Single ValidationRule" sections="//@tabs.0/@sections.0" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSingleValidationRule">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" name="stereotypeName" value="PapyrusDSMLValidationRule::ValidationRule"/>
+ </constraints>
+ </views>
+ <views elementMultiplicity="-1" name="Multiple ValidationRule" sections="//@tabs.0/@sections.1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isMultipleValidationRule">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" name="stereotypeName" value="PapyrusDSMLValidationRule::ValidationRule"/>
+ </constraints>
+ </views>
+ <dataContexts name="PapyrusDSMLValidationRule">
+ <elements name="ValidationRule">
+ <properties name="severity" type="Enumeration"/>
+ <properties name="class"/>
+ <properties name="id"/>
+ <properties name="isEnabledByDefault" type="Boolean"/>
+ <properties name="mode" type="Enumeration"/>
+ <properties name="target"/>
+ <properties name="message"/>
+ <properties name="description"/>
+ <properties name="statusCode" type="Integer"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.11"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.2"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/MultipleValidationRule.xwt b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/MultipleValidationRule.xwt
new file mode 100644
index 00000000000..ec177345ea4
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/MultipleValidationRule.xwt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:isEnabledByDefault"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:severity"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:mode"></ppe:EnumCombo>
+ </Composite>
+</Composite> \ No newline at end of file
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/SingleValidationRule.xwt b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/SingleValidationRule.xwt
new file mode 100644
index 00000000000..bf78e906d27
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/propertyView/dsmlvalidationproperties/ui/SingleValidationRule.xwt
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:message"></ppe:StringEditor>
+ <ppe:StringEditor input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:description"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:isEnabledByDefault"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:severity"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}"
+ property="PapyrusDSMLValidationRule:ValidationRule:mode"></ppe:EnumCombo>
+ </Composite>
+</Composite> \ No newline at end of file
diff --git a/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java
new file mode 100644
index 00000000000..cccdbae6269
--- /dev/null
+++ b/extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties/src/org/eclipse/papyrus/dsml/validation/properties/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.dsml.validation.properties;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.dsml.validation.properties"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}

Back to the top