diff options
author | Fanch BONNABESSE | 2017-09-12 08:57:55 +0000 |
---|---|---|
committer | vincent lorenzo | 2017-09-26 10:52:49 +0000 |
commit | b4cc83e670703e491cd3d2365910519660ea8347 (patch) | |
tree | a1000094f8221abd0538654d1bba5393756a8296 /plugins/doc | |
parent | 8c13243f02fe2048026380ce9812664495333d0d (diff) | |
download | org.eclipse.papyrus-b4cc83e670703e491cd3d2365910519660ea8347.tar.gz org.eclipse.papyrus-b4cc83e670703e491cd3d2365910519660ea8347.tar.xz org.eclipse.papyrus-b4cc83e670703e491cd3d2365910519660ea8347.zip |
Bug 522124: [Property View] Interaction between Component of the
Property View must be easier to do
https://bugs.eclipse.org/bugs/show_bug.cgi?id=522124
- Modify AbstractPropertyEditor to take create two properties and
manage observable listeners.
- Add an interface to handle properties listener.
- Export new package
"org.eclipse.papyrus.infra.properties.ui.listeners".
- Add an example "ReadOnlyStringPropertiesListener".
- Add of the documentation and an example.
Change-Id: Ia93d13ac84219fad09cb53cc68117f8c1077335e
Signed-off-by: Fanch BONNABESSE <fanch.bonnabesse@all4tec.net>
Diffstat (limited to 'plugins/doc')
12 files changed, 75 insertions, 4 deletions
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/META-INF/MANIFEST.MF b/plugins/doc/org.eclipse.papyrus.views.properties.doc/META-INF/MANIFEST.MF index 137495bd603..75436b2b92f 100644 --- a/plugins/doc/org.eclipse.papyrus.views.properties.doc/META-INF/MANIFEST.MF +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Require-Bundle: org.eclipse.help;bundle-version="[3.7.0,4.0.0)", org.eclipse.papyrus.infra.doc;bundle-version="[1.2.0,2.0.0)" Bundle-Vendor: Eclipse Modeling Project -Bundle-Version: 1.2.0.qualifier +Bundle-Version: 1.3.0.qualifier Bundle-Name: Properties view Documentation Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.papyrus.views.properties.doc;singleton:=true diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/build.properties b/plugins/doc/org.eclipse.papyrus.views.properties.doc/build.properties index 064e816b187..47844d4d1b7 100644 --- a/plugins/doc/org.eclipse.papyrus.views.properties.doc/build.properties +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/build.properties @@ -1,6 +1,7 @@ bin.includes = META-INF/,\
about.html,\
plugin.xml,\
- target/generated-eclipse-help/**
+ target/generated-eclipse-help/**,\
+ resource/examples/
src.includes = about.html,\
resource/
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/pom.xml b/plugins/doc/org.eclipse.papyrus.views.properties.doc/pom.xml index 40bef8e9820..4b8cc842c16 100644 --- a/plugins/doc/org.eclipse.papyrus.views.properties.doc/pom.xml +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/pom.xml @@ -8,7 +8,7 @@ <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.papyrus.views.properties.doc</artifactId> - <version>1.2.0-SNAPSHOT</version> + <version>1.3.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> <build> <plugins> diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/examples/InteractionComponent_Example.zip b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/examples/InteractionComponent_Example.zip Binary files differnew file mode 100644 index 00000000000..0abc5876282 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/examples/InteractionComponent_Example.zip diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/className_1.jpg b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/className_1.jpg Binary files differnew file mode 100644 index 00000000000..31eadba8b4f --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/className_1.jpg diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/className_empty.jpg b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/className_empty.jpg Binary files differnew file mode 100644 index 00000000000..36929c11678 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/className_empty.jpg diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/example_xwt.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/example_xwt.png Binary files differnew file mode 100644 index 00000000000..37634f1cba3 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/example_xwt.png diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/isAbstract_false.jpg b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/isAbstract_false.jpg Binary files differnew file mode 100644 index 00000000000..1fed2de5c84 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/isAbstract_false.jpg diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/isAbstract_true.jpg b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/isAbstract_true.jpg Binary files differnew file mode 100644 index 00000000000..3eba0119514 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/isAbstract_true.jpg diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/visibility_private.jpg b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/visibility_private.jpg Binary files differnew file mode 100644 index 00000000000..6f45b84bb44 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/visibility_private.jpg diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/visibility_public.JPG b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/visibility_public.JPG Binary files differnew file mode 100644 index 00000000000..dbdbb6d1fb7 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/visibility_public.JPG diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki index f60a07c2faa..1f42b2a86c0 100644 --- a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki +++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki @@ -329,7 +329,77 @@ You can now open the *.ctx file and customize your property view. Papyrus provides a simple tool to deploy a property view locally (Right click on a CTX file -> Deploy/Undeploy) -==Multipllicity Editor== + +===Interaction between Components=== + +Papyrus provides a way to synchronize several widgets between them. Indeed, this is possible by modifying the XWT files corresponding to the desired components. + +====How to use it ?==== + +To set up the interaction between several components, two global variables were created in "AbstractPropertyEditor": +* '''listeningPropertyPaths''': list of properties to listen, +* '''listenerClasses''': list of classes used to define the behaviors to be adopted when modifying the values of the properties. + A class is defined as: 'bundle name'/'path of the class' + +So we need to use these names as attributes in the desired XWT files. + +Next, create a class that inherits from "IPropertiesListener" or use an existing class such as "ReadOnlyStringPropertiesListener". The purpose of this class is to define the behavior of the chosen editor according to the associated input. + +It is at the ListenerClasses attribute that will be defined this class. The link will be made between the editor and the "PropertiesListener". + +Here is an example of adding attributes to an XWT file: + +[[File:images/example_xwt.png|Adding of attributes to an XWT file]] + +====Examples==== + +An example "InteractionComponent_Example.zip" is provided in the plugin '''org.eclipse.papyrus.views.properties.doc''', in the folder '''resource.examples'''. it is intended to show how the mechanism should be used. + +There are 3 examples of interaction between components. + +=====First example===== +For this example, create and select a class. In the 'Properties' view, a new 'tab' is present "InteractionComponent". +In this tab, if the name is not empty it is not possible to modify the label. This property is readOnly. +This is the listener "ReadOnlyStringPropertiesListener" that is used. + +When the 'Name' is empty, the 'Label' can be modified: + +[[File:images/className_empty.jpg|'Label' can be modified]] + +Otherwise it is read-only: + +[[File:images/className_1.jpg|'Label' set to read-only]] + +=====Second example===== +It is still necessary to use a class, this time the modification is done on a boolean. Modifying the 'isAbstract' property activates/deactivates the 'isActive' property. +This is the listener "ReadOnlyBooleanPropertiesListener" that is used. + +When 'isAbstract' is 'true', 'isActive' can be changed: + +[[File:images/isAbstract_true.jpg|'Is active' can be modified]] + +Otherwise it is read-only: + +[[File:images/isAbstract_false.jpg|'Is active' set to read only]] + +=====Third example===== +Here you have to create a constraint and select it. + +The enumerated 'Visibility' activates/deactivates the property 'Context'. + +If the value is 'Public', the modification is possible, otherwise the property is read-only. +The listener used is "ReadOnlyVisibilityPropertiesListener". + +When 'Visibility' is 'Public', 'Context' can be changed: + +[[File:images/visibility_public.jpg|'Context' can be modified]] + +Otherwise it is read-only: + +[[File:images/visibility_private.jpg|'Context' set to read only]] + + +==Multiplicity Editor== ===Description=== The multiplicity editor contains two modes of edition: * The '''simple''' mode which allows to edit the lower and the upper values from a unique editor |